Next.js Discord

Discord Forum

How to trigger the rerender of a client component from a server side component

Answered
Polar bear posted this in #help-forum
Open in Discord
Avatar
Polar bearOP
I have this server components (see image). When i update the job title the use effect of the client components gets triggered but when i change the jobCity it does not any idea how to make that, when the jobCity changes the client component rerenders?
Image
Answered by Polar bear
So the key props actually work, it makes the full re-rendering of the component, it was a bug with my jobCity variable that was never changing.
View full answer

1 Reply

Avatar
@Polar bear I have this server components (see image). When i update the job title the use effect of the client components gets triggered but when i change the jobCity it does not any idea how to make that, when the jobCity changes the client component rerenders?
Avatar
Polar bearOP
So the key props actually work, it makes the full re-rendering of the component, it was a bug with my jobCity variable that was never changing.
Answer