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
I have an issue in understanding the History API's state. The problem I am facing is the different behaviour between localhost and the actual deployed application.
So after I save something in state, and refresh the page I see two different behaviours.
localhost keeps a copy post refresh
production environment doesn't keep a copy after the refresh.
it talks about, the state should be serializable and the max size. But I am storing exactly the same data, in both the environments, because it's the same flow of the application.
Could anyone help with this?
I am using react-router-dom, here is the code snippet:
// inside the component,
this.props.history.push('/some/route', {
data: data
});
// in component did mount
if (this.props.location.state) {
// do something with this.props.location.state
})
I have an issue in understanding the History API's state. The problem I am facing is the different behaviour between
localhost
and the actual deployed application.So after I save something in
state
, and refresh the page I see two different behaviours.I have gone through the documentation,
https://developer.mozilla.org/en-US/docs/Web/API/History_API
it talks about, the state should be serializable and the max size. But I am storing exactly the same data, in both the environments, because it's the same flow of the application.
Could anyone help with this?
I am using react-router-dom, here is the code snippet:
The text was updated successfully, but these errors were encountered: