November 2018
Beginner
502 pages
10h 22m
English
We need an HTML page that is going to host our React app. Create a file called index.html in our dist folder, and enter the following:
<!DOCTYPE html><html><head> <meta charset="utf-8"/></head><body> <div id="root"></div> <script src="bundle.js"></script></body></html>
The HTML from our React app will be injected into the div with id ="root". All the app's JavaScript code will eventually be bundled together into a file called bundle.js in the dist folder.
Of course, neither of these exist at the moment—we'll do this in a later section.
Read now
Unlock full access