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
Hi @ctrlplusb I have a problem when a component has an error on resolving.
I am using async-component for decorating every routes.
If there are some connection troubles and I go to a specific not loaded route, the asyncComponent will render ErrorComponent or null. Great.
But after that, if change route, go to home page ( the connection is coming back ) and after that I try to go back to the route before ( the route that I had connection trouble ), the state of asyncComponent should not be dirty, the component will not be rendered, because I will have the same error, despite the connection is come back.
I suggest to add a prop for setting the state to default, in this way, the developer can decide to render again a component if it has an error.
What do you think?
The text was updated successfully, but these errors were encountered:
peppescg
changed the title
Error component state not reloaded after error
Error async-component, state not reloaded after error
Feb 11, 2019
Hi @ctrlplusb I have a problem when a component has an error on resolving.
I am using async-component for decorating every routes.
If there are some connection troubles and I go to a specific not loaded route, the asyncComponent will render ErrorComponent or null. Great.
if (error) { return ErrorComponent ? React__default.createElement(ErrorComponent, _extends({}, this.props, { error: error })) : null; }
But after that, if change route, go to home page ( the connection is coming back ) and after that I try to go back to the route before ( the route that I had connection trouble ), the state of asyncComponent should not be dirty, the component will not be rendered, because I will have the same error, despite the connection is come back.
I suggest to add a prop for setting the state to default, in this way, the developer can decide to render again a component if it has an error.
What do you think?
The text was updated successfully, but these errors were encountered: