1.0.6 • Published 4 years ago

duckness-saga v1.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

THIS PACKAGE IS LEGACY, PLEASE UPDATE TO @duckness/saga

duckness-saga

Saga extension for Duckness - Modular Redux Ducks hatchery.

npm version Dependency Status devDependency Status npm.io

Example

// counterDuck.js
import SagaDuck from 'duckness-saga'

// Create duck with the name 'counter' for 'counter-app' app
const counterDuck = SagaDuck('counter', 'counter-app')

// add saga
counterDuck.saga(function* watchIncrementAsync(_duckFace) {
  yield takeEvery('INCREMENT_ASYNC', incrementAsync)
})

// root saga
export const rootSaga = counterDuck.rootSaga

Table of Contents

API

SagaDuck extends duckness Duck

Saga

.saga(saga)

Adds a new saga to the duck

myDuck.saga(function* mySaga(duckFace) { /*...*/ })

.rootSaga

Duck's root saga that handles errors and restarts sagas that throws exceptions.

myDuck.rootSaga

Error reporter

.errorReporter

Set error reporter (default is console.error) that reports uncatched saga errors

myDuck.errorReporter(error => {
  window.Raven.captureException(error)
})

Additional resources

  • duckness - Duckness - Modular Redux Ducks hatchery
  • duckness-pool - boilerplate for React-Redux apps based on Duckness and Duckness-Saga
1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago