-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
useRouter returns a new object with each call #963
Comments
Here's the source code for this: https://github.com/blitz-js/blitz/blob/canary/packages/core/src/use-router.ts I think the solution will use |
Hi, I'm interested in fixing this bug. |
Sorry @lukawski I had started the change after creating the ticket |
Ah, okay, I guess I'll find something else to work on 😁 |
What is the problem?
The object returned from the useRouter hook returns a new object on each render which causes unexpected renders or the triggering of other hooks when used as a dependency.
Steps to Reproduce
const router = useRouter()
in your function componentVersions
Other
n/a
The text was updated successfully, but these errors were encountered: