Why is a nested component within my layout.tsx rerendering? #83481
Unanswered
bestickley
asked this question in
Help
Replies: 1 comment 4 replies
-
Mmm, there's one behavior where server actions, can lead to a layout recalculation, the three won't unmount, but the data passed from above, in the pattern you have, overrides previous data. For example, setting cookies in a server action, or revalidatePath 🤔 but that's not in navigation -
This is setting the server action, but you are experiencing this in |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Docs state here:
but this is not my experience. I have the below files/components. I'm seeing a
useEffect
within a client component within a layout.tsx rerendering because one of it's props coming from it's server component (initialChats
) is changing when I dorouter.push(...)
. Why? layout.tsx should no rerender, right?Additional information
Next.js: 15.5.0
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions