arrow_backBACK TO DRILLS
Black Belt - Hardimmutability

Array Spread With Mutated Item Property

A component creates a copied array like this:

//REACT_MODULE
const nextList = [...list];
nextList[0].seen = true;

Why is this still considered a state mutation?

BugDojo
BlogFAQ

© 2026. Carved in code.