Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update use-router.mdx #74724

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

krismile-sunflower
Copy link

import { useRouter } from "next/router" has a error. Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted.

The latest version should be
import { useRouter } from "next/navigation"

import { useRouter } from "next/router" has a error.
Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted.

The latest version should be 
import { useRouter } from "next/navigation"
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Jan 10, 2025
@ijjk
Copy link
Member

ijjk commented Jan 10, 2025

Allow CI Workflow Run

  • approve CI run for commit: bfa87cd

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants