Before the server answers
After this film you canshow a change before the server confirms it with useOptimistic.
Exercise
Download the exercise (a zip). Unzip it, read exercise.md, then in exercise/ run npm install and node check.mjs. The checker runs a real build and says PASS or FAIL for each criterion.
Recall
Answer each one out loud before you open it.
Why doesn't Bob's count move when he taps, before this film?
The count is what the server last rendered; it can't change until the server's answer arrives.
What does useOptimistic show, and for how long?
The value you set in the form's function, while that function is running; then the server's value again.
The server refuses Bob's lamps. Who puts the count back?
Nobody: when the function ends, the count follows the server's value, which never changed.