Command Palette

Search for a command to run...

Hectal
Phase 3: Conditions and Lists
React · Exercise 5 of 5 Previous
Beginner

Mini build: a grouped task board

Build a board with three columns, in this order: <section id="col-todo">, <section id="col-doing"> and <section id="col-done">. Each has an <h2> reading To do (N), Doing (N) or Done (N), where N is the number of tasks in it.

Group the tasks state by status and render each task as an <li> in its column, showing its title. In the To do and Doing columns each <li> also has a button Next that moves the task to the next column (todo → doing → done).

An empty column shows <p className="empty">Nothing here</p> and no <li>.

Typing a title into <input id="new-task"> and clicking <button id="add"> adds a new task to To do with its own unique id, and clears the input. An empty title adds nothing.

What Check tests

  1. Three columns in order with the right counts
  2. Each task is in its own column
  3. The empty Doing column shows Nothing here
  4. Next moves "Plan the trip" to Doing
  5. Adding Buy snacks puts it in To do and clears the input
  6. An empty title adds nothing
  7. No key warnings in the console

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.