Skip to content

[Beta] Remount Page Content#4981

Merged
gaearon merged 1 commit into
mainfrom
fix-state
Sep 5, 2022
Merged

[Beta] Remount Page Content#4981
gaearon merged 1 commit into
mainfrom
fix-state

Conversation

@gaearon

@gaearon gaearon commented Sep 5, 2022

Copy link
Copy Markdown
Member

I broke this in #4975. Since it no longer remounts accidentally, the page content is reconciled between navigations. But we don't want that. So, we want a key.

Comment thread beta/src/pages/_app.tsx
return <Page routeTree={routeTree}>{content}</Page>;
return (
<Page routeTree={routeTree}>
<React.Fragment key={router.pathname}>{content}</React.Fragment>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to show up in DevTools. Not good?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions

github-actions Bot commented Sep 5, 2022

Copy link
Copy Markdown

Size Changes

Details

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 127.55 KB (🟡 +11 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

@gaearon gaearon merged commit 1d8f8eb into main Sep 5, 2022
@rickhanlonii rickhanlonii deleted the fix-state branch April 29, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants