-
Notifications
You must be signed in to change notification settings - Fork 960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make it easier to disable has history query key #47
Comments
How will disabling the hash history query key help you with that? |
For a fix to your specific problem, you can also pass Or you could do what React Router does and pass https://github.com/rackt/react-router/blob/master/modules/Router.js#L49 I agree that it's a bit weird that This thread probably belongs over at React Router. |
@mjackson From the hash history caveats I was under the impression that this option would disable the persistent state storage. I'm seeing a different value for _k every time I push or replace state, though. @acdlite I appreciate your quick response. Should I take this to react router, or redux router?
In my logs I see:
I appreciate the quick response, guys. Thanks! |
@eknuth what did you end up doing about the storage quota? To disable function useNoQueryKey(createHistory) {
return function(options={}) {
options.queryKey = false;
return createHistory(options);
};
}
export default reduxReactRouter({
createHistory: useNoQueryKey(createHashHistory),
routes
}); @mjackson is it safe to disable |
@amccloud I ended up not disabling the queryKey for history. We just stopped pushing all of our state in the router actions. When you push or replace, the first argument can be an empty string. |
@eknuth You can disable the queryKey this way
The only disadvantage is that it logs warnings to console, although seems it will resolved soon too. |
How can I turn if off for |
See #163 It's not super high priority though because hash history is really only for older browsers. |
I'm using history in conjunction with react router and redux router. With this setup there is no way to set the queryKey option to false. I'm consistently blowing up my session storage quota.
To initialize the redux router you pass the createHistory function as an argument. createHistory is then called by react router with the default option for queryKey.
I realize this issue has more to do with how these three project are used together, but I figured I would start here.
The text was updated successfully, but these errors were encountered: