1// frontend/src/App.js
2import React, { Component } from "react";
3import { BrowserRouter, Route, Switch } from "react-router-dom";
4import Home from "./components/Home";
5
6class App extends Component {
7 render() {
8 return (
9 <div>
10 <BrowserRouter>
11 <Switch>
12 <Route exact path="/" component={Home} />
13 </Switch>
14 </BrowserRouter>
15 </div>
16 );
17 }
18}
19
20export default App;
21
1import React, { Component } from "react";
2
3class App extends Component {
4 render() {
5 return <h1>Hi!</h1>;
6 }
7}
8
9export default App;
10