Shallow rendering, setState after setProps calls componentWillReceiveProps#1779
Conversation
|
Thanks! I'll rebase this and tweak to use jsx, and then give it a review. |
|
Thanks for the quick response, @ljharb! Looking forward to review. 😄 |
ljharb
left a comment
There was a problem hiding this comment.
I was able to verify that the tests fail without your fix.
| }); | ||
| }); | ||
|
|
||
| describeIf(is('>= 16.3'), 'should not call componentWillReceiveProps after setState is called', () => { |
There was a problem hiding this comment.
i changed this from is('16.3.0-0') because we want it to apply to v16.4 and later also.
Can you elaborate, though, on why this wouldn't be true for all versions of react?
|
@ljharb Thanks for rebasing as well as the additional changes! I initially used I pulled down your changes, fixed |
- [New] Add forwardRef support (#1592, @jquense) - [New] Add Portal support (#1760, #1761, #1772, #1774, @jgzuke) - [New] Add pointer events support (#1753, @ljharb) - [Fix] preemptively fix compat with React v16.4.3 (#1790, #1778, @gaearon, @aweary) - [Fix] `shallow`: prevent rerenders with PureComponents (#1786, @koba04) - [Fix] `shallow`: skip updates when nextState is `null` or `undefined` (#1785, @koba04) - [Fix] `shallow`: `setState` after `setProps` calls `componentWillReceiveProps` (#1779, @peanutenthusiast) - [Fix] `mount`/`shallow`: be stricter on the wrapper’s setState/setProps callback - [Fix] `shallow`/`mount`: improve error message when wrapping invalid elements (#1759, @jgzuke) - update deps - [Refactor] remove most uses of lodash - [meta] ensure a license and readme is present in all packages when published
Fix for #1746