mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
7ac5d48341
Summary: On Android we have the notion of "virtual views", which are defined consistently but the logic is scattered and duplicated throughout the codebase. The logic exists to mark nodes that exist in the ShadowTree, but not the View tree. We want to CREATE, UPDATE, and DELETE them on the platform, but not INSERT or REMOVE them. They basically exist as EventEmitter objects. The only issue with this is (1) duplicated code, which opened the possibility for inconsistent definition (2) StubViewTree did not account for virtualized views, which caused assert crashes in debug mode for certain LayoutAnimations on Android. By moving the definition to ShadowViewMutation and accounting for it in StubViewTree, asserts are correct and consistent on all platforms. This was not caught until recently, because, until recently, no asserts actually ran on Android. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D27001199 fbshipit-source-id: eb29085317037ba8a286d7813bdd57095ad4746f