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

Update 04-linking-and-navigating.mdx, Partial Rendering, explain about unmounting and losing state #70397

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

niecnasowa
Copy link
Contributor

What?

Update 04-linking-and-navigating.mdx, 4. Partial Rendering section, add information that rerenders of sibling routes mean full rerender of the page, unmounting and losing the state of the page

Why?

I've spent a lot of time trying to understand why in the app router when switching between sibling routes (and Dynamic Segments) I lose scroll position. Finally, find a discussion that this is the intentional behaviour of the Next.js team. Would be good if the Next.js users could find information in the documentation instead of searching for issues and discussions in the documentation.

#50711

How?

Updated docs

@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Sep 24, 2024
@ijjk
Copy link
Member

ijjk commented Sep 24, 2024

Allow CI Workflow Run

  • approve CI run for commit: 7c97aa3

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

@lyleunderwood
Copy link

I think it's more correct to say that the components will be unmounted and remounted, and thus lose state.

@niecnasowa niecnasowa requested a review from ijjk October 2, 2024 07:37
niecnasowa and others added 3 commits October 2, 2024 12:03
…-and-navigating.mdx

Co-authored-by: JJ Kasper <jj@jjsweb.site>
…-and-navigating.mdx

Co-authored-by: JJ Kasper <jj@jjsweb.site>
@ijjk ijjk enabled auto-merge (squash) October 7, 2024 17:45
@ijjk ijjk merged commit 8cbabd3 into vercel:canary Oct 7, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants