-
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
Make hash history "same path" warning use console.warn #488
Comments
Agree this warning can be annoying. We're currently using the Looking into this a bit further, it looks like they are opposed to using Anyway, we don't really need a stack trace, so I'd be open to switching to a
If we can do both of those I'd say we're good to go. |
Hi, I am having such warning/error spamed everytime I click my link. Should I be concerned? |
I do have the same warning, URL shows my path but there is no redirection. Any clue would be appreciated. |
Hej @mjackson, would you accept a PR for this? I would also recommend renaming extending that warning to make it clear how it was caused. It took me a while to get that this isn’t something I caused with a wrong setup 😆 Maybe replace:
with:
Or even easier to grasp:
|
Hey everyone, sorry for the delay here. Yes, I'd be happy to accept a PR here if anyone's up for it. It's not super high priority for me since this warning only appears in development. |
Could the 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack' warning be turned into a console.warn rather than a console.error? When using React Router, this warning will spam the console cause confusion and concern. Changing the warning to a console.warn will better serve it's purpose.
Also, console.warn on it's own does not support all browsers, so a different method might be required.
Line of interest: https://github.com/ReactTraining/history/blob/master/modules/createHashHistory.js#L217
Current:
Desired:
The text was updated successfully, but these errors were encountered: