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:
Родитель
cd5fe06abe
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче