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
If a component's render method throws an error, it leaves React in an inconsistent state.
Subsequent renders attempt to update the inconsistent component and result in errors like "Cannot read property 'getHostNode' of null".
Proposed behavior
React could catch the error from the render method, set an "inconsistent state" flag and re-throw it.
Afterwards, if React is about to update the previously rendered component, but this flag is set, it could discard or unmount the existing component and perform a fresh render, as if the container were empty.
Which versions of React, and which browser / OS are affected by this issue?
I've encountered the inconsistent state problems in 15.5 and 15.6
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
If a component's render method throws an error, it leaves React in an inconsistent state.
Subsequent renders attempt to update the inconsistent component and result in errors like "Cannot read property 'getHostNode' of null".
Proposed behavior
React could catch the error from the render method, set an "inconsistent state" flag and re-throw it.
Afterwards, if React is about to update the previously rendered component, but this flag is set, it could discard or unmount the existing component and perform a fresh render, as if the container were empty.
Which versions of React, and which browser / OS are affected by this issue?
I've encountered the inconsistent state problems in 15.5 and 15.6
The text was updated successfully, but these errors were encountered: