mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ca234ba10e
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46317 Changes `AnimatedProps` to avoid allocating `AnimatedStyle` (and `AnimatedTransform`, `AnimatedObject`) unless necessary. This not only reduces memory and traversal overhead, but it enables us to implement allowlist strategies to prune unnecessary traversals. Changelog: [General][Changed] - Animated now omits `style` if the supplied value is null, undefined, or not an object. Previously, it would emit an empty `style` object. [General][Changed] - Animated now resolves `style` to the original prop value if it contains no `AnimatedNode` instances. Previously, it would resolve to a flattened style object. Reviewed By: javache Differential Revision: D62117423 fbshipit-source-id: 34b0c9940be5b6f5d94467993a5344406cc56f93