mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-20 16:04:32 +08:00
Summary: D14323747 broke SSTs. This PR optimized implementation of nativeID. Instead of searching entire tree to find a view, it uses a map to cache views which have nativeID set. The map uses keys with format <nativeID-rootViewTag>. Finding the rootViewTag causes a race condition, due to [this syncing code](https://fburl.com/93vqzlbg). The SST runner attempts to read the map to find a [SST view](https://fburl.com/8zadz024) before that view is added to the map. My fix is to change the key format to simply <nativeID>. Product code should not duplicate nativeID since it is used to uniquely identify react managed views from native. I'll comment on PR with this fix. Reviewed By: shergin, mmmulani Differential Revision: D14416262 fbshipit-source-id: 3b707f2ff4049ac83ac8861e3cda435224d973d8