Loading lesson…
Level 1 · Apprentice0 XP
What makes the screen change, and what really happens when you call a setter.
Step 1 / 5
ProblemYou write let count = 0, add one on click, and the screen still shows 0. The variable changed. React does not know, so it did not draw again.
← → step
Before this: React with TypeScript
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Build a counter with +1, +3 and reset. Make +3 by calling the setter three times. First write it the wrong way (setCount(count + 1) three times) and see it add 1. Then fix it. Then keep a list in state and add an item without push.