@samitouri / QOS-React-2 / commits / 59f21f1b24

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.

Sebastian Markbåge committed Jan 3, 2020 at 17:35 UTC 59f21f1b2444aabe9133c358eaa0ed2c7b953ea7
1 file changed +2
packages/react-reconciler/src/ReactFiberCompleteWork.js
+2
@@ -539,6 +539,8 @@ if (supportsMutation) {
539 // We'll have to mark it as having an effect, even though we won't use the effect for anything.
540 // This lets the parents know that at least one of their children has changed.
541 markUpdate(workInProgress);
542 + } else {
543 + workInProgress.stateNode = current.stateNode;
544 }
545 };
546 } else {