Recap: List Manager
Part of the Fundamentals section of Coddy's Vue journey. Lesson 30 of 55.
Challenge
EasyBuild a small supply manager from the supplied initial items. Add trimmed nonempty supplies with #draft and #add, clearing the field after success. Render ul#result rows with names and remove-ID buttons, keyed by unique ids. Show the current total as Supplies: 2 initially in #count. Remove by id, including after adding a new item.
Use increasing integer ids starting at 3 for new records. Each remove button says Remove. Put each supply name in a span.title. Show the total as Supplies: N, initially Supplies: 2.
The initial records are id 1 named Seeds and id 2 named Pots.
Try it yourself
<!doctype html><html><head><meta charset="UTF-8"><title>Vue practice</title></head><body><div id="app"></div><script type="module" src="./main.js"></script></body></html>All lessons in Fundamentals
2Reactive State
Reactive RefsUpdating Refs in ScriptEvent Handler ArgumentsReactive ObjectsRecap: Reactive State5Conditions and Lists
Conditional BranchesShow without UnmountingRendering ListsStable List IdentityRecap: Conditions8Component Communication
Emitting EventsEvent PayloadsLifting Shared StateDefault and Named SlotsRecap: Shared Panel11Project: Community Board
Board StructureAdding Community Tasks6Working with Lists
Adding List ItemsRemoving by IdComputed Search ResultsCounts from ListsRecap: List Manager