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 newTodoForm component
From the course: Building Modern Projects with React
Creating the newTodoForm component
- Okay, so far we have our TodoList, and our TodoListItem components. The next and final component that we're going to add is the new TodoForm component. And this is a component that our users will be able to use to create new Todo's. So it'll have a text input, as well as a button. So first let's create our new files. We'll say NewTodoForm.js, and NewTodoForm.css. And it's going to be very similar to our other components where we say import, react, from react. And then we're going to define our component, const NewTodoForm equals. And for the time being, this component isn't going to take any props. Although it'll definitely get some later on in the course. And now for this NewTodoForm component, we're going to have a div with the class name new-todo-form. And it's going to have an input. We'll say type equals text. And we'll add more to this later on, but for now, this is all we need. And we're going to have…
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
-
-
-
-
-
-
-