Advanced
Milestone 3: save the board to localStorage
The tasks now live in an external store read with useSyncExternalStore, but nothing is saved. Finish taskStore.js.
Save the tasks as JSON under the key hectal-board after every dispatch. readSaved() must return the saved array, or SEED_TASKS when the key is missing, the JSON is broken, or the value isn't an array.
The Reload from storage button (#reload) calls store.reload(), which re-reads storage: it stands in for reloading the page. (The preview's localStorage is in memory and resets on every Run.)
What Check tests
- Adding a task saves it under
hectal-board - Reload shows what is in storage
- Broken JSON falls back to the seed tasks
- A value that isn't an array falls back too
- Moving a card after reload is saved again
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.