Curriculum
Course: React
Login

Curriculum

React

Text lesson

Modify the React Application

Everything looks good so far, but how do you change the content? Check the my-react-app directory for the src folder, and inside you’ll find a file called App.js; open it, and it will look like this:

/myReactApp/src/App.js:

import logo from './logo.svg';
import './App.css';

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
        </a>
      </header>
    </div>
  );
}

export default App;

Try modifying the HTML content and save the file.

You’ll see the changes instantly after saving the file—no need to reload the browser!