Current behavior
Running wrapper.setProps({ foo: 'bar' }) does not trigger getDerivedStateFromProps when the component is shallowly rendered.
Expected behavior
Running wrapper.setProps({ foo: 'bar' }) should trigger getDerivedStateFromProps when the component is shallowly rendered.
Your environment
React 16.3, macOS High Sierra
API
Version
| library |
version |
| Enzyme |
3.3.0 |
| React |
16.3.0 |
Adapter
Current behavior
Running
wrapper.setProps({ foo: 'bar' })does not triggergetDerivedStateFromPropswhen the component is shallowly rendered.Expected behavior
Running
wrapper.setProps({ foo: 'bar' })should triggergetDerivedStateFromPropswhen the component is shallowly rendered.Your environment
React 16.3, macOS High Sierra
API
Version
Adapter