JSPM

redux-saga-takex

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 23
  • Score
    100M100P100Q57800F
  • License MIT

A powerful take effect accepting RegExp instead of listing action types.

Package Exports

  • redux-saga-takex

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-saga-takex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM Package Dependency Status

redux-saga-takex

A powerful take effect accepting RegExp instead of listing action types.

NOTICE: This package is still under development.

TL; DR

Before

// Ooops, so long...
const action = yield take(['SUCCESS_LOGIN', 'SUCCESS_LOGOUT', 'SUCCESS_GET_HOGE', 'SUCCESS_PUT_HOGE', ...]);

After

const action = yield takex(/^SUCCESS_/);

Usage

Install package from npm

npm install --save redux-saga-takex

Then import and use it in your saga.

import takex from 'redux-saga-takex';

// ...


function* mySaga() {
  const { payload } = yield takex(/^SUCCESS_/);

  // ...
}

Example

WIP

Development

Setup & Build

npm install
npm run build

Changelog

See the Releases page on GitHub.

License

MIT

Author

Yuki Kodama / @kuy