<App /> is the first component your React app will call, and it serves as the container for rendering all the other components in your application.
src/app.js in your text editor.
At the top you'll see the
import statements familiar from
This component imports a few modules, defines a new class
App , and then exports that class as a module.
You might take a minute to make sure you understand how line 1 works. It uses destructuring to set a constant
Component equal to the property
Component on the React module object. This is some syntactic sugar that allows you to directly reference
Component in this file instead of
Line 5 defines the App component class. It inherits from the base
Component class, and defines only one property here, the
render() function. All components are expected to define a function called
render() that is expected to return the elements for the component to render, and you can see that that's what this one does.
This component currently has some placeholder text, and mostly creates static elements that look like normal HTML, with the exception of the
src attribute of the logo image. That's the only example here of an actual template expression, so let's see how it works.