Adding Community Tasks
Part of the Fundamentals section of Coddy's Vue journey. Lesson 52 of 55.
Keep everything you built in the previous step, including the heading, slot layout, task rows and live summary. Implement TaskForm.vue with input#draft and button#add. Emit an add event with trimmed nonempty text. The parent appends an open task, using increasing integer ids starting at 3. Clear the input only after a successful add. Ignore blank drafts. All new records use the existing row component and contribute to the summary.
Challenge
MediumKeep everything you built in the previous step, including the heading, slot layout, task rows and live summary. Implement TaskForm.vue with input#draft and button#add. Emit an add event with trimmed nonempty text. The parent appends an open task, using increasing integer ids starting at 3. Clear the input only after a successful add. Ignore blank drafts. All new records use the existing row component and contribute to the summary.
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