A React-Static plugin that adds support for @reach/router
- Install this plugin and peer dependencies:
$ yarn add react-static-plugin-reach-router @reach/router
- Add the plugin to your
static.config.js
:
export default {
plugins: ['react-static-plugin-reach-router'],
}
-
Follow the Dynamic Routes with Reach Router guide to configure your routes for both dynamic and static rendering
-
(Optional) Configure the plugin:
export default {
plugins: [
[
'react-static-plugin-reach-router',
{
RouterProps: {
// These props will be passed to the underlying `Router` component
},
},
],
],
}