Creating a web page
If you're starving for some React goodness, then I have great news for you! We're almost there. All that's left to do is to create index.html
with a link to our snapterest.js
script.
Create the index.html
file in the ~/snapterest/build/
directory. Add the following HTML markup to it:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" /> <title>Snapterest</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> </head> <body> <div id="react-application"> I am about to learn the essentials of React.js. </div> <script src="./snapterest.js"></script> </body> </html>
Open ~/snapterest/build/index.html
in a web browser. You should see the following text: I am about to learn the essentials of React.js. That's right, we have finished setting up our project, and it's time to get to know React!