With these resources set, I will describe how to make the simplest possible React app.
Step 1: HTML
In the HTML, we simply need to create a div container for our app output. It can be named anything you want. In this case, I named my div “chris”. For example:
<div id="chris"> <!-- React will render view data here --> </div>
This div id will be referred to by React.
render()function. This function takes two arguments:
1. The HTML (or view) to be rendered.
ReactDOM.render( <h1>Simplest React</h1>, document.getElementById('chris') );
Here is what the project looks like on codepen:
For more information about getting started with React, see: