From the course: Building Modern Projects with React

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating the todoList component

Creating the todoList component

From the course: Building Modern Projects with React

Start my 1-month free trial

Creating the todoList component

- [Instructor] Okay, so the first component that we're going to create for our app is the TodoList component. And this is going to be pretty straightforward. The first thing we're going to do is inside our source directory we're going to create another folder, and we're going to call it todos. And inside this folder we're going to create a file called TodoList.js. And from here our TodoList component is going to be a pretty straightforward react component. We're just going to say import React from react. And then define our component. We'll say const TodoList equals. And then its only prop for now is going to be the todos that it's supposed to display. And what it's going to do is inside a div, with the class name list-wrapper, className list-wrapper, it's going to simply take the todos that it gets as a prop and say todos.map. And for each todo, it's going to display a TodoListItem component. We'll create that in…

Contents