flux-router

0.0.1-alpha3 • Public • Published

flux-router Build Status

A router to use with Flux and React.

Getting Started

Get flux-router

Flux Router is available on both bower and npm. You should get it from wherever you're using flux from, or if you're using something like browserify to compile your code you should get it from npm, so you can require the module directly.

Bower

bower install flux-router

npm

npm install flux-router

Usage

If you're using flux-router from npm, you should require the module in first. If you're using it from bower, fluxRouter will be available in the global scope.

var fluxRouter = require('flux-router'); // only needed for npm
 
var router = new fluxRouter(Dispatcher);

You should instantiate Flux Router with your app's dispatcher, to avoid having more than one dispatcher per application.

Run Tests

If you wish to test Flux Router yourself, you will need to run

npm install

And if you don't have gulp installed, also run

npm install gulp -g

Once gulp is installed, you can then run

gulp test

Tests are executed in Chrome, using Karma and Jasmine.

Versions

Current Tags

Version History

Package Sidebar

Install

npm i flux-router

Weekly Downloads

1

Version

0.0.1-alpha3

License

MIT

Last publish

Collaborators

  • ryanclark