dillon1000/react

Commit

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.
Browse files
Changed paths3 files
First-parent comparison
M src/core/ReactUpdateQueue.js ModifiedM src/core/__tests__/ReactComponentLifeCycle-test.js ModifiedM src/core/__tests__/ReactCompositeComponent-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…