Created
February 10, 2020 00:49
-
-
Save EnetoJara/4a28594cbd4ffa34a688ba7fd1ccb19c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { BrowserRouter, Redirect, Route, Switch } from "react-router-dom"; | |
import './App.css'; | |
import { Home } from "./Home"; | |
import { Son } from "./Son"; | |
function App() { | |
return ( | |
<div className="App"> | |
<BrowserRouter> | |
<Switch> | |
<Route exact path="/son" component={Son}/> | |
<Route exact path="/" component={Home}/> | |
<Redirect from="*" to="/" /> | |
</Switch> | |
</BrowserRouter> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment