Skip to content
Discussion options

You must be logged in to vote

This is related to React lifecycle and not Next.js.
When states or giving props are changed in ancestor components of the component, the render function of the component is recalled every time even if the same props are given.

If you write code within if statements in render functions directly, they are called many times more than expected.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@josebrito
Comment options

Answer selected by josebrito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants