Answer
React detects state changes using reference equality. Mutating state directly keeps the same reference, preventing React from re-rendering.
Sign in to access all features and personalize your learning experience.
Source: SugharaIQ