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
From the course: Building Modern Projects with React
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Building a React project from scratch1m 53s
-
(Locked)
The React entry point3m 10s
-
(Locked)
Supporting ES61m 46s
-
(Locked)
The Index.js file and app component3m 31s
-
(Locked)
Building and serving with webpack7m 15s
-
(Locked)
Hot-reloading with react-hot-loader3m 9s
-
(Locked)
Meet the sample app52s
-
(Locked)
Creating the todoList component1m 58s
-
(Locked)
Creating the todoListItem component2m 14s
-
(Locked)
Creating the newTodoForm component3m 29s
-
(Locked)
Putting the app together1m 59s
-
-
-
-
-
-
-