redux-little-router driver for k-ramel


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
Minified + gzip package size for @k-ramel/driver-redux-little-router in KB



redux-little-router driver for k-ramel


In a reaction (See main documentation about listeners/reactions)

Declare it in your store :

import driver from '@k-ramel/driver-redux-little-router'

const router = driver({ routes }, state => state.router, 'router')

    // your usual definition
    drivers: { router },

In your reaction :

export const onUserLoggedIn = (store, action, drivers) => {
  const { router } = drivers
  // get userId in route params
  const userId = router.getRouteParam('userId')
  // dispatch push action to go to the new route

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.