UNPKG

react-static

Version:

A progressive static site generator for React

20 lines (17 loc) 366 B
import React from 'react' import { withRouteData, Link } from 'react-static' // export default withRouteData(({ posts }) => ( <div> <h1>It's blog time.</h1> <br /> All Posts: <ul> {posts.map(post => ( <li key={post.id}> <Link to={`/blog/post/${post.id}/`}>{post.title}</Link> </li> ))} </ul> </div> ))