dillon1000/react
Commit
Browse files Make setState in render a warning, not an invariant
We keep track of the fact that something is rendering for a bunch of warnings. (ReactCurrentOwner.current !== null) Once we get rid of owner for string refs, I'll convert those to something like "isRendering" instead. The interesting part is that feature `__DEV__` only. It is only used for warnings. Except for this case. This means that we can get rid of the special case for the isRendering stack on in prod.
Changed paths2 files
First-parent comparisonsrc/renderers/shared/reconciler/ReactUpdateQueue.js ModifiedM src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…