-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Add hook for router on update. Fixes #302. #321
Add hook for router on update. Fixes #302. #321
Conversation
So... how is this different from the existing Not sure I see a difference? If you can't do what you want with |
@KyleAMathews I just tested the anchor links solution I referenced in #302 with the existing I guess the difference is that |
@adjohnson916 thanks for the research! Yeah they do sound almost identical. Let's just use React Router's actual API vs. our History implementation. How about we mark the old |
@KyleAMathews Thanks, I've made the changes in another commit to this PR's branch. Note that the new method |
4c6d9fa
to
4275cd0
Compare
How about we keep passing the location object to the new hook? Any reason not too? That'd smooth the transition plus it's useful. Also there's a small eslint error that needs fixed. |
@KyleAMathews We could pass in the location object, it's just that React Router's I see the eslint error now - sorry I didn't check earlier. Mind if I change eslint rules by adding |
Yes, please pass the location object through So on the lint error, I don't see why you'd have to change the lint rules. Perhaps all you need to do is remove the back slashes? It's not necessary to escape new lines with back ticks as they work for multi-line quotes. |
3e2e57d
to
62478cc
Compare
@KyleAMathews OK, now passing location. I didn't want the newlines in the output. So I've just collapsed it to a single long line, and that passes eslint. Hope that's OK. |
Looks great, thanks for taking this on! Will make a quick new release in a sec. |
@KyleAMathews We have an issue here. Apparently |
👍 thanks for noticing + taking care of this! |
@KyleAMathews See #343. Thanks. |
No description provided.