-
Notifications
You must be signed in to change notification settings - Fork 961
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
push()
and replace()
will keep current search
and hash
string
#814
Comments
Got the same issue |
Yeah, this definitely seems like a bug to me too as it's a breaking change that is not documented with the 5.0.0 release, and just feels very unintuitive. https://github.com/ReactTraining/history/releases/tag/v5.0.0 |
I think what I am seeing the same issue, but with "createHashHistory":
|
Here's my workaround: const push = (to, state) => history.push({
hash: '',
search: '',
...(typeof to === 'string' ? parsePath(to) : to)
}, state) |
It looks more like a bug than a feature 🤔 |
same is here #808 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
Current location is
http://localhost?a=a#b
Do
Expect
Location change to
http://localhost
Actual
Location still is
http://localhost?a=a#b
The text was updated successfully, but these errors were encountered: