Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-router-kit

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-router-kit

Routing tools for Redux/React

  • 0.0.21
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Redux Router Kit

travis

Redux Router Kit aims to be a relatively minimalistic router that fits well with Redux and React. Some basics are built-in, but you can stitch together its pieces for a customized solution. It provides:

  • Redux action types for routing.
  • Redux action creators for routing.
  • Redux middleware for some handling of routes, for example onEnter and onLeave hooks.
  • Redux reducer for adding routing information to the store state.
  • Some utilities, including matching URLs to routes.
  • A History component that abstracts the browser's history as a React component.
  • A Router component that does maps routes to components.
  • Some other etc.

Install

npm install redux-router-kit --save

Basic Usage

import ReactDOM from 'react-dom';
import { combineReducers, applyMiddleware, Provider } from 'react-redux';
import {
  routerReducer, createRouterMiddleware, RouterContainer
} from 'redux-router-kit';

import HomePage from './components/HomePage';
import TodoApp from './components/TodoApp';

const routes = {
  '/': HomePage,
  '/todos': TodoApp,
  '/todos/:id': TodoApp
};

const reducer = combineReducers({
  router: routerReducer
});

const store = createStore(
  reducer,
  applyMiddleware(
    createRouterMiddleware({routes})
  )
);

const Root = React.createClass({
  render() {
    return (
      <RouterContainer routes={routes}/>
    )
  }
})

ReactDOM.render(
  <Provider>
    <Root/>
  </Provider>
  document.getElementById('app')
);

Keywords

FAQs

Package last updated on 07 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc