dillon1000/react
Commit
Browse files [fail] Only warn on unacted effects for strict / non sync modes (#16041)
* only warn on unacted effects for strict / non sync modes (basically, when `fiber.mode !== 0b0000`) Warnings on unacted effects may be too noisy, especially for legacy apps. This PR fires the warning only when in a non sync mode (concurrent/batched), or when in strict mode. This should make updating easier. I also added batched mode tests to the act() suite. * explicitly check for modes before warning, explicit tests for all modes
Changed paths4 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMHooks-test.js ModifiedM packages/react-dom/src/__tests__/ReactTestUtilsAct-test.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…