Skip to content

Instantly share code, notes, and snippets.

@misselliev
Created August 13, 2020 00:21
Show Gist options
  • Select an option

  • Save misselliev/eb05d2be32e3dd6d8c75b3737a6323c0 to your computer and use it in GitHub Desktop.

Select an option

Save misselliev/eb05d2be32e3dd6d8c75b3737a6323c0 to your computer and use it in GitHub Desktop.
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import TourDates from './pages/TourDates';
import Home from './pages/Home';
const Routes: React.FC = () => (
<Switch>
<Route exact path="/" component={Home} />
<Route path="/dates" component={TourDates} />
</Switch>
);
export default Routes;
@misselliev
Copy link
Author

Creating a Routes file for an article on Dev.To

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment