Skip to content

shastajs/shasta-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Dead simple router for shasta

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published