arrow_backBACK TO DRILLS
Blue Beltstate-basicslockPREMIUM

Mirroring props into state

A component initializes state with const [color] = useState(props.color). Later, the parent passes a different color prop, but the UI still shows the old one. Why?

lock

This Drill is Locked

This is a premium drill. Continue on to the next free drill in the sequence.

CONTINUE DRILLarrow_forward
BugDojo
BlogFAQ

© 2026. Carved in code.