daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Dec 9th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Route, Switch } from 'react-router';
  2. import { Link } from 'react-router-dom';
  3. import React from 'react';
  4.  
  5. import routes from './routes';
  6.  
  7. const Layout = () =>
  8.   <div>
  9.     <nav>
  10.       <ul>
  11.         <li>
  12.           <Link to="/">Home</Link>
  13.         </li>
  14.         <li>
  15.           <Link to="/another">Another page</Link>
  16.         </li>
  17.       </ul>
  18.     </nav>
  19.  
  20.     <Switch>
  21.       {routes.map(route => <Route key={route.name} {...route} />)}
  22.     </Switch>
  23.   </div>;
  24.  
  25. export default Layout;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand