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.
The Index.js file and app component
From the course: Building Modern Projects with React
The Index.js file and app component
- [Instructor] Now that we've got support for ES6 and react syntax, although we still have to actually build and serve our project, we'll see how to do that in the coming video. We're going to create three files inside of our source folder. This is the first actual react code that we're going to write here. The first file that we're going to create is going to be called index.js. And this will contain the code that inserts our react app into our index.HTML page. And then we're going to create two more files, one called App.js, and the other called App.css. And these two components will contain the code and the styling respectively, for the root component of our application, which for now will be the only component in our application. So we're going to code this component first, open up App.js, and we're going to write the following code. We're going to say import React from react and then import App.css. And then…
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
-
-
-
-
-
-
-