Skip to content

Instantly share code, notes, and snippets.

@philmander
Last active February 14, 2018 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philmander/be4c78db2f4d67d26bd4152af21c591a to your computer and use it in GitHub Desktop.
Save philmander/be4c78db2f4d67d26bd4152af21c591a to your computer and use it in GitHub Desktop.
import { createRouter } from 'router';
const router = createRouter([
{
path: '/foo:/
view: <MyComponent />
enter: ({ foo }) => store.loadVenue(foo);
},
paths: [ '/foo:/', 'bar:/' ],
view: <SomethingElse />
], 'my-router');
router.start({ url, history });
<Router use="" />
<Match />
<Link />
when(() => state.initialized, next);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment