Dead simple router for shasta
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
test
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

shasta-router NPM version Downloads Build Status

Wraps react-router + react-router-redux and provides the simplest API possible. Built for shasta, but will work in any redux application.

This is a work in progress - There is sparse documentation, no tests, and this is not on npm. Use at your own risk until we finish!

Install

npm install shasta-router

Get Started

  • Import in the module
  • Add it to your store's plugins
  • Router state is now under router in your store

ES6 Example

import { createStore, combineReducers } from 'shasta'
import * as router from 'shasta-router'

// you get the point
let store = createStore({
  plugins: [ router ]
})
hook(store)

API

  • history
  • actions
  • reducers
  • middleware
  • hook

Components

These are all re-exported from react-router, the behavior is exactly the same. See the react-router documentation if you haven't used these before.

  • Router
  • Route
  • Link
  • Redirect
  • IndexRoute
  • IndexLink
  • IndexRedirect