Files
react-native/packages
Tim Yung ca234ba10e Animated: Lazily Allocate AnimatedNode Instances (#46317)
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
2024-09-09 20:34:57 -07:00
..
2024-09-09 07:26:53 -07:00
2024-09-09 07:26:53 -07:00
2024-09-09 03:54:43 -07:00