mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Any component wrapped via `createAnimatedComponent()` will always re-render, because it creates a new `style` object. It's impossible to memoize. Adding `useMemo()` here ensures that the `style` object passed to the underlying object is stable: if no `style` is passed to the wrapped component, then memoization can work. Allowing memoization to function when the `style` object is passed in will require a deeper fix. See https://fb.workplace.com/groups/rn.support/permalink/26084643474490921/ Before: {F1496803038} After: {F1496805410} ## Changelog: [General] [Fixed] - Fixed memoization for components wrapped with createAnimatedComponent Differential Revision: D56618868 fbshipit-source-id: a0af8b1a02c34b5cf6e6d7e9f0381fb323b232cc