diff --git a/packages/animated/src/createHost.test.ts b/packages/animated/src/createHost.test.ts index e38218657a..d6c1939e90 100644 --- a/packages/animated/src/createHost.test.ts +++ b/packages/animated/src/createHost.test.ts @@ -57,6 +57,7 @@ describe('createHost', () => { const { animated } = createHost({ NamedComponent }, hostConfig) const A = animated(NamedComponent) + expect(A.displayName).toBe('Animated(NamedComponent)') }) diff --git a/packages/animated/src/createHost.ts b/packages/animated/src/createHost.ts index a214ce4921..7a518d5645 100644 --- a/packages/animated/src/createHost.ts +++ b/packages/animated/src/createHost.ts @@ -19,7 +19,7 @@ type WithAnimated = { [key: string]: any } -// For storing the animated version on the original component +/** Module-level cache so animated wrappers survive across createHost calls */ const cacheKey = Symbol.for('AnimatedComponent') // Fallback cache for component objects that are non-extensible (e.g. React