- Run the project
- Make a change and see the app update
- Stop the project
-
Run one of the following commands:
npm start
yarn start
-
After the application builds, it will automatically open your
Chrome
browser to http://localhost:3000.
-
Add some additional text (exclamation points) in the
render
method of theApp
component as shown below.function App() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <p> Edit <code>src/App.js</code> and save to reload. </p> <a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer" > - Learn React + Learn React!!! </a> </header> </div> ); }
-
Save your changes to the file.
In the VS Code menu bar you can turn on
File > Autosave
and this is recommended for the course. -
Verify the additional text is displayed in your browser.
The page will automatically reload if you make changes to the code. The file saves then the code compiles then the browser refreshes.
- Focus your cursor in the
command prompt
(Windows) orterminal
(Mac). - Type
Ctrl + C
.On
Windows
you will be prompted withAre you sure you want to... (Y/N)
...typey
. - Use what you learned earlier in the lab to restart the application.