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

The Index.js file and app component

From the course: Building Modern Projects with React

Start my 1-month free trial

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…

Contents