Last active
July 28, 2020 13:55
-
-
Save giioohbernini/019e0493566af65f963d94921b537448 to your computer and use it in GitHub Desktop.
Web to native #1
This file contains hidden or 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 as Router, | |
Route, | |
} from 'react-router-dom' | |
import Root from './Root' | |
import Home from './pages/Home' | |
import About from './pages/About' | |
const AppRouter = () => { | |
return ( | |
<Router component={Root}> | |
<Route> | |
<Route component={Root}/> | |
<Route exact path="/" component={Home} /> | |
<Route path="/about" component={About}/> | |
</Route> | |
</Router> | |
) | |
} | |
export default AppRouter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment