Notice: This package is deprecated in favor of fluxible-router
.
Provides routing methods to your Fluxible application using routr.
var Fluxible = require('fluxible');
var routrPlugin = require('fluxible-plugin-routr');
var app = new Fluxible();
var pluginInstance = routrPlugin({
routes: {
user: {
path: '/user/:id',
method: 'get',
// flux-router-component uses this action when the route is matched
action: function (actionContext, payload, done) {
// ...
done();
}
}
}
});
app.plug(pluginInstance);
This software is free to use under the Yahoo! Inc. BSD license. See the LICENSE file for license text and copyright information.