ToDoList Component

Learn how to further break down a React component into smaller parts.

Add ToDoList

Because we’re working with function-based components, we can also pass arguments and parameters to React components, like we can with functions in JavaScript. This ToDoList component takes props (properties) and provides data to these props as an argument when we call the ToDoList component in the input.js file. The component receives the argument as a props object. We create a list of tasks that appear in CSS-grid format to show our output.

List of tasks

We pass an item property to this component that has an array of all task objects with toDo ...