Skip to content

Instantly share code, notes, and snippets.

@isacjunior
Created August 21, 2018 06:03
Show Gist options
  • Save isacjunior/9c5d03adb02f8fa08a5f8cf7e711c7ba to your computer and use it in GitHub Desktop.
Save isacjunior/9c5d03adb02f8fa08a5f8cf7e711c7ba to your computer and use it in GitHub Desktop.
import React, { Fragment } from 'react'
import BrowserRouter from 'react-router-dom/BrowserRouter'
import Route from 'react-router-dom/Route'
import Switch from 'react-router-dom/Switch'
import Nav from './Components/Nav'
import Main from './Components/Main'
import Other from './Components/Other'
const Routes = () => (
<BrowserRouter>
<Fragment>
<Nav />
<Switch>
<Route exact path="/" component={Main} />
<Route path="/other" component={Other} />
</Switch>
</Fragment>
</BrowserRouter>
)
export default Routes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment