Skip to content

refectjam/create-saga-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-saga-core

get started

install

yarn add redux redux-saga

yarn add create-saga-core

basic template

import createSagaCore from 'create-saga-core'

createSagaCore({ initializer }).then(store => {
  /* insert code */
})

function* initializer() {
  /* insert code */
}

api

  • createSagaCore({ reducer, reducers, sagas, initializer })

    • reducer - Reducer
    • reducers - {Reducer}
    • sagas - {Saga}
    • initializer - Saga

    notes:

    • all arguments are optional, though it doesn't make since to provide nothing
    • provide either reducer or reducers to participate in state management
    • resolves with store after initializer completes
    • sagas will 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

About

convenience initializer for redux-saga apps

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published