mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3426f1f537
Summary: As soon as we have traits infra, it's pretty straight-forward to implement this kinda flag. Without the traits, it's challenging to build that in a performant and elegant way. The challenges of the dynamic_cast-involved approach are: * How to check for that feature in YogaLayoutableShadowNode? * Even if we use `dynamic_cast`, to which class to cast? * We also need to do that in constructor... and dynamic_cast-like checks for `this` don't work in constructors (C++ design limitation). * How to scale that if we have more classes like Paragraph (and we will have it for sure)? * Performance. * Relying on RTTI. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18525347 fbshipit-source-id: b1915f43ff3fe4364ab6345fb9d1becc591b5a35