solid-docs
solid-docs copied to clipboard
stores_createstore missing a step
On this page: https://www.solidjs.com/tutorial/stores_createstore
In the lesson text https://github.com/solidjs/solid-docs/blob/main/langs/en/tutorials/stores_createstore/lesson.md
There is a step missing:
Update
<For each={todos()}>
to use the store:
<For each={store.todos}>
The Solve button shows the correct solution.
Second issue:
There is a minor inconsistency with the solution from Solve. It gives
setStore("todos", todo => todo.id === id, "completed", completed => !completed);
as the solution, whereas the tutorial text says
setStore('todos', (t) => t.id === id, 'completed', (completed) => !completed);