mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
0544568d86
Summary: Changelog: [internal] Components can update state multiple times before the state update queue is flushed. This causes unnecessary layout/diff and mount passes. To solve this, drop stale state updates inside `stateUpdateQueue_ ` for specific `ShadowNodeFamily`. Delivering stale status updates is redundant. Let's take SafeAreaView as an example. It schedules 5-6 state updates before `stateUpdateQueue_` is flushed. That's unnecessary work blocking JS thread. We only care about the latest state update. Same for TextInput and other components using state updates. Reviewed By: JoshuaGross Differential Revision: D23987707 fbshipit-source-id: 2e3f92cc93af61d78ac564aa40aef165af64b8c1