Skip to content
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

Resolved issue N.4362 #4364

Closed
wants to merge 19 commits into from
Closed

Resolved issue N.4362 #4364

wants to merge 19 commits into from

Conversation

angeldevildev
Copy link

Closes: #4362

What are the changes and their implications?

All the useRouter are imported from next/navigation

Bug Checklist

  • [ Y ] Changeset added (run pnpm changeset in the root directory)
  • [ Y ] Integration test added (see test docs if needed)

Feature Checklist

  • [ Y ] Changeset added (run pnpm changeset in the root directory)
  • [ Y ] Integration test added (see test docs if needed)
  • [ Y ] Documentation added/updated (submit PR to blitzjs.com repo main branch)

Copy link

changeset-bot bot commented Jul 24, 2024

⚠️ No Changeset found

Latest commit: 882b213

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@siddhsuresh
Copy link
Member

siddhsuresh commented Jul 30, 2024

@angeldevildev thanks for the PR! I am not sure I understand, why these changes? (This will break all blitz apps 😅)

Understanding the imports:

  1. we import from "next/router" for the pages router apps,
  2. "next/compat/router" for deciding whether the app is in pages or app router. and
  3. "next/navigation" for app router apps.

You can read up on this in the next.js docs

https://nextjs.org/docs/app/api-reference/functions/use-router
https://nextjs.org/docs/pages/api-reference/functions/use-router

Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Which useRouter?
3 participants