Interview practice question
Updating an object in state doesn't re-render
Frontend Engineering · React · Beginner
You change a property on an object in state and call the setter with the same object, but the UI doesn't update. Why?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Mutation keeps same reference.
- React compares with Object.is; same reference → skip.
- Create new object with spread.
- Same for arrays (no push).
- Immer for nested updates.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.