Now that we have defined our first component, let's render it and see what it looks like:
- First, we edit src/App.js, and remove all its contents.
- Then, we start by importing React and the Login component:
import React from 'react'import Login from './user/Login'
It is a good idea to group imports in blocks of code that belong together. In this case, we separate external imports, such as React, from local imports, such as our Login component, by adding an empty line in between. Doing so keeps our code readable, especially when we add more import statements later.
- Finally, we define the App component, and return the Login component:
export default function App () { return <Login />}
If we are only returning a single ...