Skip to content

Commit

Permalink
docs: define router instance in code block (#54707)
Browse files Browse the repository at this point in the history
…g scroll
  • Loading branch information
sadaffathali committed Aug 31, 2023
1 parent 4f0b715 commit ac56bca
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ The default behavior of the Next.js App Router is to scroll to the top of a new
// useRouter
import { useRouter } from 'next/navigation'

const router = useRouter()

router.push('/dashboard', { scroll: false })
```

Expand Down

0 comments on commit ac56bca

Please sign in to comment.