dillon1000/react

Commit

using the wrong renderer's act() should warn (#15756)

* warn when using the wrong renderer's act around another renderer's updates

like it says. it uses a real object as the sigil (instead of just a boolean). specifically, it uses a renderer's flushPassiveEffects as the sigil. We also run tests for this separate from our main suite (which doesn't allow loading multiple renderers in a suite), but makes sure to run this in CI as well.

* unneeded (and wrong) comment

* run the dom fixture on CI

* update the sigil only in __DEV__

* remove the obnoxious comment

* use an explicit export for the sigil
Browse files
Changed paths16 files
First-parent comparison
M .circleci/config.yml ModifiedM fixtures/dom/package.json ModifiedM fixtures/dom/public/act-dom.html ModifiedA fixtures/dom/src/index.test.js AddedM package.json ModifiedM packages/react-dom/src/client/ReactDOM.js ModifiedM packages/react-dom/src/fire/ReactFire.js ModifiedM packages/react-dom/src/test-utils/ReactTestUtils.js ModifiedM packages/react-dom/src/test-utils/ReactTestUtilsAct.js ModifiedM packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.js ModifiedM packages/react-reconciler/src/ReactFiberReconciler.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-test-renderer/src/ReactTestRendererAct.js ModifiedA packages/react/src/ReactCurrentActingRendererSigil.js AddedM packages/react/src/ReactSharedInternals.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…