1.0.2 • Published 9 months ago
@duckness/pool-saga-stream v1.0.2
@duckness/pool-saga-stream
@duckness/saga plugin for @duckness/pool
Example
import Pool from '@duckness/pool'
import PoolSagaStream from '@duckness/pool-saga-stream'
import CounterSagaDuck from './ducks/CounterSagaDuck'
const CounterPool = Pool({
buildStore: ({ initialCounter = 0 } = {}) => {
return { counter: initialCounter }
}
})
CounterPool.addDuck(CounterSagaDuck)
CounterPool.addStream(PoolSagaStream())
CounterPool.build({initialCounter: 0})
CounterPool.store
// => [redux store]Table of Contents
API
Create Pool Saga Stream
PoolSagaStream({
// build custom root saga from ducks instead of default root saga
?buildRootSaga: (ducks, { refDucks, refErrorReporter }) => rootSaga*
})buildRootSaga
Optional function for custom root saga
(ducks, { refDucks, refErrorReporter }) => rootSaga*
ducksare array of ducksrefDucks.currentwill hold current array of ducks.refErrorReporter.currentwill hold current error reporter function.
default buildRootSaga
Default root saga will combine all duck root sagas (if exists) wrapped in try/catch restarting duck root saga in case of exception.
Use Pool Saga Stream
pool.addStream(PoolSagaStream())Examples
https://github.com/hitosu/duckness/tree/master/stories
@Duckness packages:
- @duckness/duck - Modular Redux Ducks hatchery
- @duckness/saga - Redux Saga extension for @duckness/duck
- @duckness/epic - Redux-Observable extension for @duckness/duck
- @duckness/pool - @duckness/duck + Redux
- @duckness/pool-saga-stream - @duckness/saga plugin for @duckness/pool
- @duckness/pool-epic-stream - @duckness/epic plugin for @duckness/pool
- @duckness/react-redux-pool - @duckness/pool + React-Redux
- @duckness/use-redux - React hook for Redux store
- @duckness/use-pool - React hook for @duckness/pool.
- @duckness/store - simple store for React components
- @duckness/reactor - reactive data flow builder
1.0.2
9 months ago
1.0.0
2 years ago
0.10.0
3 years ago
0.9.0
4 years ago
0.8.1
4 years ago
0.8.0
5 years ago
0.7.5
5 years ago
0.7.4
5 years ago
0.7.3
5 years ago
0.7.2
5 years ago
0.7.1
5 years ago
0.6.11
5 years ago
0.6.10
5 years ago
0.6.9
5 years ago
0.6.7
5 years ago
0.6.6
5 years ago
0.6.5
5 years ago
0.6.4
5 years ago
0.6.3
5 years ago
0.6.2
5 years ago
0.6.1
5 years ago
0.6.0
5 years ago
0.5.5
5 years ago
0.5.4
5 years ago
0.5.2
5 years ago
0.5.1
5 years ago
0.5.0
5 years ago
0.4.4
5 years ago
0.4.1
5 years ago
0.4.3
5 years ago
0.4.2
5 years ago
0.4.0
5 years ago