Next.js · Junior · Question 61 of 75
What does scroll={false} on <Link> do?
- ✓Correct answer: Keeps the current scroll position instead of scrolling to the top of the new page
- 2Disables scrolling on the target page
- 3Prevents the link from prefetching
Explanation
By default Next.js scrolls to the top of the new segment if it isn't visible. Disable it, e.g., for tabs that only change part of the page.