November 2019
Beginner
804 pages
20h 1m
English
Now that the router is in place, let's create our initial views. We'll start with the Home view, which will be displayed by default. This view will be similar to the one in LyricsFinder V1. We will later add the search component to it.
Go ahead and do the following:
For now, just add this within the home.tsx file:
import React from 'react';
export const Home = () => {
return <h2>Home</h2>;
};
Now, adapt frontend/src/App.tsx and add the following inside of the BrowserRouter component:
<Route exact path='/' component={Home} />
With this, we have instructed the router to render the Home page when ...
Read now
Unlock full access