mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Optimize the update of state during first render of a View
Summary: This is an optimization to avoid transfering updateState instructions twice during the frist render of a view (same a props) Reviewed By: shergin Differential Revision: D15476041 fbshipit-source-id: 8a62035dbbb63c93f86a2f8d217986a325cb1805
This commit is contained in:
committed by
Facebook Github Bot
parent
cd5fe06abe
commit
92f8fd22e2
@@ -458,6 +458,12 @@ void Binding::schedulerDidFinishTransaction(
|
||||
deletedViewTags.end()) {
|
||||
mountItems[position++] =
|
||||
createUpdatePropsMountItem(javaUIManager_, mutation);
|
||||
|
||||
// State
|
||||
if (mutation.newChildShadowView.state) {
|
||||
mountItems[position++] =
|
||||
createUpdateStateMountItem(javaUIManager_, mutation);
|
||||
}
|
||||
}
|
||||
|
||||
// LocalData
|
||||
@@ -472,12 +478,6 @@ void Binding::schedulerDidFinishTransaction(
|
||||
if (updateLayoutMountItem) {
|
||||
mountItems[position++] = updateLayoutMountItem;
|
||||
}
|
||||
|
||||
// State
|
||||
if (mutation.newChildShadowView.state) {
|
||||
mountItems[position++] =
|
||||
createUpdateStateMountItem(javaUIManager_, mutation);
|
||||
}
|
||||
}
|
||||
|
||||
// EventEmitter
|
||||
|
||||
Reference in New Issue
Block a user