When we start to make an application with ReactJS, we need to do some setup, which just involves an HTML page and includes a few files. First, we create a directory (folder) called chapter1
. Open it up in any of your code editors. Create a new file called index.html
directly inside it and add the following HTML5 boilerplate code:
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <title>ReactJS Chapter 1</title> </head> <body> <!--[if lt IE 8]> <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/"> upgrade your browser</a> to improve your experience.</p> <![endif]--> <!-- Add your site or application content here --> <p>Hello world! This is HTML5 Boilerplate.</p> </body> </html>
This is a standard HTML page that we can update once we have included the React and Bootstrap libraries.
Now we need to create a couple of folders inside the chapter1
folder named images
, css
, and js
(JavaScript) to make your application manageable. Once you have completed the folder structure it will look like this: