-
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
Remove queryKey: false
from docs.
#337
Conversation
Thanks! |
@@ -2,7 +2,7 @@ | |||
|
|||
Using `window.location.hash` is a common trick that is used to mimic the HTML5 history API in older browsers. It works for most use cases and provides good compatibility across a wide range of browsers. However, in order to preserve state across browser sessions we need a place to store some state. | |||
|
|||
HTML5 gives us the `pushState` method and the `popstate` event, but in older browsers the only thing we have is the URL. So, when using hash history, you'll see an extra item in your query string that looks something like `_k=123abc`. This is a key that `history` uses to look up persistent state data in `window.sessionStorage` between page loads. If you prefer to use a different query parameter, or to opt-out of this behavior entirely, use the `queryKey` configuration option. | |||
HTML5 gives us the `pushState` method and the `popstate` event, but in older browsers the only thing we have is the URL. So, when using hash history, you'll see an extra item in your query string that looks something like `_k=123abc`. This is a key that `history` uses to look up persistent state data in `window.sessionStorage` between page loads. If you prefer to use a different query parameter, use the `queryKey` configuration option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change
when using hash history
to
when using
location.state
with hash history
or something to that effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
👍 |
Curious why? |
Yup - would also love to know; this is useful information! |
No description provided.