/fluxible-plugin-routr

[DEPRECATED] A plugin for fluxible applications to provide routing methods

Primary LanguageJavaScriptOtherNOASSERTION

Routr Plugin for Fluxible

Notice: This package is deprecated in favor of fluxible-router.

npm version Build Status Dependency Status devDependency Status Coverage Status

Provides routing methods to your Fluxible application using routr.

Usage

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);

API

License

This software is free to use under the Yahoo! Inc. BSD license. See the LICENSE file for license text and copyright information.