mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
HostText needs to copy over from current if it is unchanged in persistent mode (#17538)
stateNode is not one of the fields that gets copied over by createWorkInProgress. This is bad for persistent mode since it's not the same instance. In HostComponent we happened to always end up transferring the current stateNode when we bail. However, we didn't do this for HostText.
This commit is contained in:
committed by
Dan Abramov
parent
7e2ab87a61
commit
59f21f1b24
@@ -539,6 +539,8 @@ if (supportsMutation) {
|
||||
// We'll have to mark it as having an effect, even though we won't use the effect for anything.
|
||||
// This lets the parents know that at least one of their children has changed.
|
||||
markUpdate(workInProgress);
|
||||
} else {
|
||||
workInProgress.stateNode = current.stateNode;
|
||||
}
|
||||
};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user