How to use the kea.keaReducer function in kea

To help you get started, we’ve selected a few kea examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zeit / next.js / examples / with-kea / store.js View on Github external
import { keaReducer } from 'kea'
import { createStore, compose, combineReducers } from 'redux'

const reducers = combineReducers({
  kea: keaReducer('kea'),
})

const reduxDevTools =
  typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__
    ? window.__REDUX_DEVTOOLS_EXTENSION__()
    : f => f

export const initStore = initialState => {
  return createStore(reducers, initialState, compose(reduxDevTools))
}

kea

Smart front-end architecture

MIT
Latest version published 1 year ago

Package Health Score

62 / 100
Full package analysis