Come back to this a few days after finishing the course. Try everything without looking back at earlier lessons first.
Bug hunt
This Study Hub has four bugs, from Days 2, 3, 4 and 5. Try these, in order, and note what goes wrong each time:
- Tick External stores, then open Stats.
- Back in Topics, type win in Filter, open Focus timer, and come back.
- Press Ctrl+K, then Escape, then Ctrl+K again.
- Select Windowing, wait for the error, and press Try again.
Runs with Vite on your computer: unzip, then
npm install and npm run dev. Hint 1: what you should have seen
- The box stays unticked, but Stats says 1 of 12 topics done.
- The filter is empty.
- The palette doesn't open the second time.
- The server timed out. again, every time.
Hint 2: where to look
toggleDone in store/progress.js; TabPanel in components/Tabs.jsx; how
CommandPalette renders Dialog; and the Try again button in
topics/TopicsPanel.jsx.
Show the four bugs and the fixed app
- The store changes its state in place (Day 2).
toggleDonepushes ontostate.doneand returns the same object, sosetStatedecides nothing changed and tells no subscriber. Stats only shows the right count because it mounts fresh. Return a new object:({ done: [...state.done, id] }), orfilterto remove. - Hidden tabs are removed (Day 4).
TabPanelreturnsnullwhen it isn't selected, so the panel unmounts and loses its state. Wrap it in<Activity mode={selected === value ? "visible" : "hidden"}>. - The dialog can't report that it closed (Day 5). Escape closes the native
dialog, but without
onClosethe palette'sopenstate is stilltrue, so the nextsetOpen(true)changes nothing. PassonClose={() => setOpen(false)}. - Try again reuses the failed promise (Day 3). The cache still holds the
rejected promise, so
usethrows the same error. Callinvalidate(selectedId)before resetting.
Runs with Vite on your computer: unzip, then
npm install and npm run dev. Recall questions
Answer each in a sentence or two, then check the lesson it came from.
- How do you choose between
valueanddefaultValue, and what goes wrong if a component switches modes while mounted? (Day 1) - Why must a
useSyncExternalStoreselector not build a new object each time? (Day 2) - Why does a promise passed to
useneed a cache? (Day 3) - What does a transition change about how a Suspense fallback appears? (Day 3)
- What should you do before optimising a slow screen? (Day 4)
- What happens to a hidden
Activitychild's state and effects? (Day 4) - Why does a combobox keep focus in its input? (Day 5)
- Why must a live region exist before its text changes? (Day 5)
- Why does a fake-timer test need one
actper step? (Day 6)
Ready for the next step?
You're ready to move on if you can, without help:
- design a component API with compound parts and controlled props
- move shared state into a store, and read it with cheap selectors
- load data with Suspense, and keep the screen steady with transitions
- measure a slow screen, find the cause, and fix it
- build a dialog and a combobox that work with only a keyboard
- test hooks, timing and a server, and say what jsdom can't check
If one of these feels shaky, redo that day's checkpoint from scratch.
Completion is saved in this browser only. It does not measure mastery.