@allain/surplus-router
v0.1.2
Published
Simple router for use with surplus
Downloads
346
Readme
surplus-router
A simple router for use with Surplus
Install
npm install --save surplus-router
Example Usage
import * from Surplus from 'surplus'
import { Route } from 'surplus-router'
const view = <div>
<Route path="/">
<h1>Main Page</h1>
<p><a href="#/test/123">Test 123</a></p>
<p><a href="#/test/456">Test 456</a></p>
</Route>
<Route path="/test/:number">{({number}) => <p>Test {number}</p>}</Route>
</div>;
document.body.appendChild(view); // add view to document
API
License
ISC © allain