I want to store url query as a state on location.
~ history.push({
+ ...history.location,
+ search: query.toString(),
+ state: {
+ myState: query.toString(),
+ },
+ })
I suspect get state when a route change, but state become undefined when I back from other route.