dillon1000/react

Commit

Add failing test case for ValidateNoSetStateInRender bug

The current heuristic to check if setState is called in render is based on 
whether the lambda containing the call to setState has a mutable range that got 
extended. This doesn't seem to work in all cases so this validation needs a bit 
more work before we can turn it on by default
Browse files
Changed paths2 files
First-parent comparison
A compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.expect.md AddedA compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.js Added
Patch

Files changed

Rendering syntax-highlighted changes…