How to use the react-static.getRouteProps function in react-static

To help you get started, we’ve selected a few react-static examples, based on popular ways it is used in public projects.

github pkrawc / react-static-markdown / src / containers / Element.js View on Github external
import React from 'react'
import { getRouteProps, Link } from 'react-static'

const Element = getRouteProps(({ contents }) => (
  <div className="element">
    <Link to="/docs">Go back</Link>
    <div dangerouslySetInnerHTML={{ __html: contents }} />

export default Element