0.1.3 • Published 7 years ago
create-saga-core v0.1.3
create-saga-core
- convenience initializer for redux-saga apps
get started
install
yarn add redux redux-saga
yarn add create-saga-corebasic template
import createSagaCore from 'create-saga-core'
createSagaCore({ initializer }).then(store => {
/* insert code */
})
function* initializer() {
/* insert code */
}api
createSagaCore({ reducer, reducers, sagas, initializer })reducer- Reducerreducers- {Reducer}sagas- {Saga}initializer- Saga
notes:
- all arguments are optional, though it doesn't make since to provide nothing
- provide either
reducerorreducersto participate in state management - resolves with store after
initializercompletes sagaswill be promisified and attached at<Store>.api
caveats
- only works in the context of ES modules
- may need to run through transpiler depending on target environment