jalan

0.2.1 • Public • Published

jalan Build Status Coverage Status npm version

functional routing for redux

usage example

usage

import { createStore, applyMiddleware } from 'redux';
import sagaMiddleware from 'redux-saga';
import { createHistory } from 'history';
import { createJalan } from 'jalan';
 
import { INDEX, NEWS, NEWS_ITEM } from '...';
import reducer from '...';
 
const routes = [
  { '/':          INDEX     },
  { '/news':      NEWS      },
  { '/news/{id}': NEWS_ITEM },
];
 
const history = createHistory();
 
const finalCreateStore = applyMiddleware(sagaMiddleware(
  createJalan(history, routes)
))(createStore);
 
const store = finalCreateStore(reducer);

Readme

Keywords

none

Package Sidebar

Install

npm i jalan

Weekly Downloads

1

Version

0.2.1

License

ISC

Last publish

Collaborators

  • barbuza