Sometimes we use history.location.state to pass "temporary state". When finished using, it should be cleaned up immediately. As far as I know, there is NO API to clear the location state, and the only workaround is:
history.replace(currentPath, undefined);
I don't want to argue about where the "temporary state" should be kept, that's a different issue. Adding a history API to clear history.location.state sounds reasonable.
Thanks 馃檪
This would be a question for the history library: https://github.com/ReactTraining/history
Oh cool, I can transfer these now. Sorry, just learning the new features (which I think is over a year old, so "new")
This would be a question for the history library: https://github.com/ReactTraining/history
Yes, you are right, my bad.
Oh cool, I can transfer these now. Sorry, just learning the new features (which I think is over a year old, so "new")
Thank you, Tim 馃槃
Most helpful comment
Oh cool, I can transfer these now. Sorry, just learning the new features (which I think is over a year old, so "new")