Goldpage + Crossroads =
@goldpage/crossroads
Routing with Crossroads.js.
Usage
Install @goldpage/crossroads
.
$ npm install @goldpage/crossroads
The plugin is automatically loaded and
the route
property of your page configs is now handled by Crossroads.
Example
// ./example/pages/hello-crossroads.page.js
import React from 'react';
export default {
route: '/hello/{name}',
view: ({name}) => (
<div>
<h1>Hello {name}</h1>
Statically routed with Crossroads.
</div>
),
renderToHtml: true,
};