Next.js Discord

Discord Forum

When I use revalidate, re-render occurs

Answered
Scaly-naped Pigeon posted this in #help-forum
Open in Discord
Avatar
Scaly-naped PigeonOP
I use revalidateTag server action in Client Component.
When I use revalidateTag, re-render occurs.
Is it a bug? Why occur re-render?
Answered by B33fb0n3
well, the rerender occurs, because the data cache is invalide. The server tries to get new data (from the invalidated data fetching methods) and send them to the client. The client modify the dom and because of the modify there is a rerender. No bug 🙂
@Scaly-naped Pigeon
View full answer

3 Replies

Avatar
B33fb0n3
well, the rerender occurs, because the data cache is invalide. The server tries to get new data (from the invalidated data fetching methods) and send them to the client. The client modify the dom and because of the modify there is a rerender. No bug 🙂
@Scaly-naped Pigeon
Answer
Avatar
B33fb0n3
@Scaly-naped Pigeon solved?
Avatar
Scaly-naped PigeonOP
Yes! I understand