dillon1000/react
Commit
Browse files Double Invoke Effects in __DEV__ (in old reconciler fork) (#20415)
We originally added a new DEV behavior of double-invoking effects during mount to our new reconciler fork in PRs #19523 and #19935 and later refined it to only affect modern roots in PR #20028. This PR adds that behavior to the old reconciler fork with a small twist– the behavior applies to StrictMode subtrees, regardless of the root type. This commit also adds a few additional tests that weren't in the original commits.
Changed paths7 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberClassComponent.old.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.old.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js ModifiedA packages/react-reconciler/src/__tests__/ReactDoubleInvokeEvents-test.internal.js AddedM packages/react-reconciler/src/__tests__/ReactDoubleInvokeEvents-test.js ModifiedM packages/react/src/__tests__/ReactProfiler-test.internal.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…