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:
Sebastian Markbåge
2020-01-03 17:35:17 +00:00
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 {