Course contentsShow
React
Lesson 377 of 2,39611. useState Patterns and PitfallsPro lesson

Common Mistake: Mutating prevState

Why you must return a new reference in functional updates: mutating prevState directly breaks React's immutability contract.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.