1.2.0 • Published 5 years ago

@k-ramel/driver-redux-little-router v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@k-ramel/driver-redux-little-router

redux-little-router driver for k-ramel

Examples

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')

createStore(
  {
    // 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
  router.push(`/user/${userId}`)
}
1.2.0

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.0

6 years ago

1.0.0-alpha.0

6 years ago

0.15.1

6 years ago

0.14.0

6 years ago

0.13.2

6 years ago

0.13.1

6 years ago

0.13.0

6 years ago

0.12.0

6 years ago

0.11.0

6 years ago

0.10.0

6 years ago

0.9.0

6 years ago