mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c5f704b8e3
Summary: This is the first diff in the journey of removing `enable_shared_from_this` from `ShadowNode` class. In general, using `enable_shared_from_this` is fine, it's a normal standard feature and there is nothing wrong with that... besides the fact that using this thing is usually an indication of overall poor design. In Fabric, we don't really have a good reason for that, I think in all cases it can be avoided, so I think we should remove that. Removing that is also code-size and perf win. This particular diff changes the signature of `RootShadowNode::clone()` which allows removing the necessity of usage `.shared_from_this()` from callsites. The rest changes are purely cosmetical. Changelog: [Internal] Small Fabric-specific optimization. Reviewed By: sammy-SC Differential Revision: D17973958 fbshipit-source-id: 5539ceff9d11b4281a6ebe8d80e90d6bd90e44d8