--- title: Your first React App --- ## Your first React App ### Installation As specified in the previous artice (Installation), run the `Create React App` tool. After everything has finished, `cd` into the folder of your application and run `npm start`. This will start a development server and you are all set to start developing your app! ```bash npm install -g react-create-app create-react-app my-first-app cd my-first-app npm start ``` ### Editing the code Start up your editor or IDE of choice and edit the `App.js` file in the `src` folder. When created with the `react-create-app` tool, there will already be some code in this file. The code will consist of these parts: #### imports ```JavaScript import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; ``` This is used by [webpack](https://webpack.js.org/) to import all required modules so that your code can use them. This code imports 3 modules: 1) `React` and `Component`, which allow us to use React as it should be used. (With components) 2) `logo`, which allows us to use `logo.svg` in this file. 3) `./App.css`, which imports the stylesheet for this file. #### classes/components ```JavaScript class App extends Component { render() { return (
To get started, edit src/App.js
and save to reload.