provideStore(store)

A higher-order saga that injects the provided store into the saga's context.

Arguments

  1. store (Object): An object that conforms to the Redux store API. Generally, this will be the root Redux store of the application, but it could also be a subspace if required.

  2. options (Object): The saga middleware options to pass to use when running subpsaced sagas.

Returns

(Function): A function that accepts a saga (generator function) and returns a new saga that injects the store into the saga's context before executing the orignal saga.

Examples

import { provideStore } from 'redux-subspace-saga'
import { store, saga } from 'somewhere'

const wrappedSaga = provideStore(store)(saga)

results matching ""

    No results matching ""