Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. const List = () => {
  2. return (
  3. <Router>
  4. <div class="list">
  5. <Route path="/item/:id" component={Preview} />
  6. {_.map(
  7. [{id: 1, title: 'This is title'}, {id: 2, title: 'This is another one'}],
  8. I => <Link to={`/item/${I.id}`}>{I.title}</Link>
  9. )}
  10. </div>
  11. </Router>
  12. );
  13. }
  14.  
  15. const Preview = ({item}) => {
  16. return (
  17. <div>This is list item preview</div>
  18. );
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement