Why doesn’t updating state directly trigger a re-render?

Entry React

Answer

React re-renders only when the state updater function is called. Direct mutation does not notify React.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice