dillon1000/react
Commit
Browse files Warn when calling setState & other methods at wrong time
Currently we use an invariant to prevent this code pattern. That is really aggressive for something that doesn't actually put React in a bad state. This diff replaces invariants with warnings and makes those code paths no-ops.
Changed paths3 files
First-parent comparisonsrc/core/ReactUpdateQueue.js ModifiedM src/core/__tests__/ReactComponentLifeCycle-test.js ModifiedM src/core/__tests__/ReactCompositeComponent-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…