Community Task Board
Part of the Fundamentals section of Coddy's Vue journey. Lesson 55 of 55.
Keep the complete board from all previous steps. Extract its state, computed values and actions into useBoard.js, exporting useBoard(). Create its state inside the function and return live refs and actions to the app. Add a non-immediate watcher of the global open-task count. Append a history row only when that count changes, formatted Open tasks: old to new. Render the rows in ol#history in transition order. Searching, filtering, or removing an already completed task must not create a history entry. The board still supports adding, toggling, removing and filtering tasks with the same ids and behavior.
Challenge
HardKeep the complete board from all previous steps. Extract its state, computed values and actions into useBoard.js, exporting useBoard(). Create its state inside the function and return live refs and actions to the app. Add a non-immediate watcher of the global open-task count. Append a history row only when that count changes, formatted Open tasks: old to new. Render the rows in ol#history in transition order. Searching, filtering, or removing an already completed task must not create a history entry. The board still supports adding, toggling, removing and filtering tasks with the same ids and behavior.
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>This lesson includes a short quiz. Start the lesson to answer it and track your progress.
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 Tasks