Implement the core interaction
Use a clear data model and one-way rendering for add, complete, filter, and delete.
- Difficulty
- beginner
- Time
- 70 minutes
- Last verified
- 9/21/2026
What you will build
Use a clear data model and one-way rendering for add, complete, filter, and delete.
Understand the idea first
Use a clear data model and one-way rendering for add, complete, filter, and delete.
Build it step by step
state → render(state) → user event → update state → render(state)- Open the previous project and record its result.
- Type the example and complete: Finish four operations and test normal, empty, and boundary cases.
- Change one input, predict, then verify.
- Create and repair: Do not mutate the DOM from many places; render predictably from state.
Read the important lines
- Use a clear data model and one-way rendering for add, complete, filter, and delete.
- Read input, processing, and output separately.
- Verify another input and an edge case.
Common mistakes and what to check
| Symptom | What to check |
|---|---|
| Unexpected result | Do not mutate the DOM from many places; render predictably from state. |
| Nothing changes | Save, verify paths, and read the first relevant Console error. |
Practice without copying
Finish four operations and test normal, empty, and boundary cases.
Check the answer after you try
Rebuild and explain the decisions. Check: Do not mutate the DOM from many places; render predictably from state.
Completion check
- I produced the required visible result
- I can explain the input, processing, and output
- I tested normal, edge, and failure cases