-
Notifications
You must be signed in to change notification settings - Fork 49
docs: Add useRouter Documentation #325
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
Conversation
A couple of things I noticed:
Should I change these here, or file a separate PR? |
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.
I left some comments. Happy to hear your thoughts on them!
P.S. No worries for squashing your commits. They are automatically squashed on PR merge
apps/documentation/src/routes/documentation/hooks/use-router.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/hooks/use-router.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/hooks/use-router.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/hooks/use-router.mdx
Outdated
Show resolved
Hide resolved
Thanks for your comments, I've implemented them, and they've let me make that example much simpler! |
Thanks for addressing this! |
Regarding #325 (comment)
pathname is the standard name so it should remain the same.
You can submit a separate PR for addressing this type refine. Thanks! |
Context & Description
See this discord thread. This PR adds documentation for the
useRouter
hook, including an example, documentation for the returned router object, and all methods returned (so far only router.push).I like to rebase and squash PRs into one commit because I think it keeps history cleaner, so it might be a bit messy until I do that :)