rr

radi-router

The official router for Radi.js.

Showing:

Popularity

Downloads/wk

5

GitHub Stars

23

Maintenance

Last Commit

3yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

1.9KB

License

MIT

Type Definitions

Tree-Shakeable

Yes?

Categories

Readme

radi-router

radi-router is the official router for Radi.js. It deeply integrates with Radi for seamless application building.

npm version npm downloads gzip bundle size radi workspace on slack

Installation

To install the stable version:

npm install --save radi-router

This assumes you are using npm as your package manager.

If you're not, you can access these files on unpkg, download them, or point your package manager to them.

Browser Compatibility

radi-router currently is compatible with browsers that support ES6. In stable release v1 it will support ES5 compatible browsers and even some below that, yes - looking at IE8 too.

Documentation

Documentation is currently being written. For now just a few examples to work our appetite.

Foo bar routing example

/** @jsx r **/
import { r, use, mount, component } from 'radi'
import router from 'radi-router'

const index = component({
  view: function() { return <h1>Index</h1> }
});

const foo = component({
  view: function() { return <h1>Foo</h1> }
});

const RouterComponent = use({
  routes: {
    '/': index,
    '/foo': foo
  }
})

mount((
  <div>
    <a href="#/">index</a>
    <a href="#/foo">foo</a>
    <div>
      { new RouterComponent() }
    </div>
  </div>
), document.body);

Stay In Touch

License

MIT

Copyright (c) 2018-present, Marcis (Marcisbee) Bergmanis

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100