You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, DOM renderer correctly renders "Hello, world" while test shallow renderer renders "undefined, world".
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Issue is introduced in React 16.
The reason must be those lines, replacing publicInstance.state with this._renderer._newState should fix it:
React 16.1.0-beta has been released. Please update react, react-dom, and react-test-renderer (if you use it) to this version and let us know if it solved the issue! We’d appreciate if you could test before Monday when we plan to get 16.1.0 out.
What is the current behavior?
If
componentWillMount
has multiplesetState
calls, only the last one works in shallow rendererIf the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
https://www.webpackbin.com/bins/-Kw11Ya_ZJ1BcL0rpDKj
Here, DOM renderer correctly renders "Hello, world" while test shallow renderer renders "undefined, world".
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Issue is introduced in React 16.
The reason must be those lines, replacing
publicInstance.state
withthis._renderer._newState
should fix it:react/src/renderers/testing/ReactShallowRendererEntry.js
Lines 212 to 215 in e932ad6
The text was updated successfully, but these errors were encountered: