Guest User

Untitled

a guest
Dec 9th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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;
Add Comment
Please, Sign In to add comment