mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
085c6d2675
Summary: Before this change, the concrete component-specific data/payload object associated with a State was stored inside a templated subclass as a normal instance variable; after the change, it's stored as a shared pointer inside the base class. The original motivation was that storing that inside subclass saves us one shared pointer and one heap allocation. This approach overcomplicated a lot of things and all possible savings are probably compensated with additional complexity (we have to have templated state-update lamdas in subclasses and so on). And to update the data in the previous approach we need to create a shared pointer to data anyway. This change will allow future improvements in the coming diff. Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D19799014 fbshipit-source-id: 287ed939353ba58d9e434d1502ecfbb208c6daa5