Skip to content

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented Sep 5, 2022

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.

return <Page routeTree={routeTree}>{content}</Page>;
return (
<Page routeTree={routeTree}>
<React.Fragment key={router.pathname}>{content}</React.Fragment>
Copy link
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
Member Author

Choose a reason for hiding this comment

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

@github-actions
Copy link

github-actions bot commented Sep 5, 2022

Size Changes

📦 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