0.5.13 • Published 3 years ago
@goldpage/crossroads v0.5.13
Goldpage + Crossroads = :heart:
@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,
};