@react-spring/animated
Advanced tools
Comparing version 9.0.0-canary.808.4.e67bf81 to 9.0.0-canary.808.5.5cdf687
@@ -427,3 +427,5 @@ 'use strict'; | ||
var withAnimated = function withAnimated(Component) { | ||
return shared.is.str(Component) ? createAnimatedComponent(Component) : Component[cacheKey] || (Component[cacheKey] = createAnimatedComponent(Component)); | ||
var animated = shared.is.str(Component) ? createAnimatedComponent(Component) : Component[cacheKey] || (Component[cacheKey] = createAnimatedComponent(Component)); | ||
animated.displayName = "Animated(" + (shared.is.str(Component) ? Component : Component.displayName || Component.name || 'Anonymous') + ")"; | ||
return animated; | ||
}; | ||
@@ -430,0 +432,0 @@ |
@@ -313,3 +313,7 @@ import { defineHidden, each, getFluidConfig, Globals, is, createInterpolator, isAnimatedString, useForceUpdate, useIsomorphicLayoutEffect } from '@react-spring/shared'; | ||
const cacheKey = Symbol.for('AnimatedComponent'); | ||
const withAnimated = Component => is.str(Component) ? createAnimatedComponent(Component) : Component[cacheKey] || (Component[cacheKey] = createAnimatedComponent(Component)); | ||
const withAnimated = Component => { | ||
const animated = is.str(Component) ? createAnimatedComponent(Component) : Component[cacheKey] || (Component[cacheKey] = createAnimatedComponent(Component)); | ||
animated.displayName = `Animated(${is.str(Component) ? Component : Component.displayName || Component.name || 'Anonymous'})`; | ||
return animated; | ||
}; | ||
@@ -316,0 +320,0 @@ const createAnimatedComponent = Component => forwardRef((rawProps, ref) => { |
{ | ||
"name": "@react-spring/animated", | ||
"version": "9.0.0-canary.808.4.e67bf81", | ||
"version": "9.0.0-canary.808.5.5cdf687", | ||
"description": "Animated component props for React", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"@babel/runtime": "^7.3.1", | ||
"@react-spring/shared": "9.0.0-canary.808.4.e67bf81" | ||
"@react-spring/shared": "9.0.0-canary.808.5.5cdf687" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
63404
20
1247
+ Added@react-spring/shared@9.0.0-canary.808.5.5cdf687(transitive)
- Removed@react-spring/shared@9.0.0-canary.808.4.e67bf81(transitive)