Training Grounds
Object State MutationBlue Belt
+25 Ki
Description

A user profile editor shows a name and email. Editing the name should update it on screen. The name never updates even though the input changes.

Anomaly

Type in the Name field — the displayed name below the inputs never changes. The value in the input itself updates but the profile summary stays stale.

Constraint
Fix must spread the existing state into a new object
Do not convert to separate useState calls for each field
Hint

Mutating a state object directly and then calling setState with the same reference does not trigger a re-render — React sees the same object reference and bails out.

Consult the SenseiOnly for those truly stuck · Flip to reveal

Mutating a state object directly and then calling setState with the same reference does not trigger a re-render — React sees the same object reference and bails out.

Loading editor…
Correct Solution
Loading...
Expected OutputGoal State
Your OutputLive