Skip to content
Rung

02/12

No. 02Easy12 min

Lists & Keys: Rendering Arrays

Mission

Turn an array of data into UI with .map(), and remove items without mutating the state.

Tasks

  1. 1

    Use .map() to return JSX for every task in the array.

  2. 2

    Give each element a stable key taken from the task's id.

  3. 3

    Add a delete button to every task.

  4. 4

    Implement removeTask so it filters the array by id.

  5. 5

    Update the state with the functional form (prev => ...).