Lesson 22 — Mini project: todo (expert)
Add, tick, remove, count
A fuller todo list stores objects { text, done }. A checkbox with v-model="x.done" ticks an item directly. splice(i, 1) removes one item at index i from the array, and a computed counts what is left — all reactive, no manual re-drawing.
list.value.splice(2, 1) // remove the 3rd item
Why it matters: these four operations are the CRUD (create, read, update, delete) heart of most apps.
Write remove(i) and the remaining count. Add A, B, C, tick A, delete B → the list has 2 items and shows "1 left".
A quick 3-question quiz on this lesson — instant feedback.
Ready for more? Optional paid resources that pick up where this lesson leaves off.
Some links on this page are affiliate links: we may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases.
Project-based Vue.js Foundations courses if you want a structured paid path after the free lessons. Wait for a sale — prices drop often.
Browse on Udemy →Search Amazon for Vue.js Foundations books — check the publication year so the examples match current versions.
Search Amazon →