Studio Code, Atom, etc.) 2. Up-to-date Browsers (Chrome, Safari, Firefox, etc.) 3. You should have Node.JS installed. (https://nodejs.org/en/) Terminal npm install -g create-react-app create-react-app my-app You can try to run the app by doing the following: cd my-app yarn start
a valid React component because it accepts a single "props" object argument with data and returns a React element. We call such components "functional" because they are literally JavaScript functions.
} } Classes have some additional features that we will discuss in the next sections. Until then, we will use functional components for their conciseness.
rendered to the DOM. This is a good place to set up a timer: componentDidMount() { this.timerID = setInterval( () => this.tick(), 1000 ); } NOTE: While this.props is set up by React itself and this.state has a special meaning, you are free to add additional fields to the class manually if you need to store something that is not used for the visual output.