redux-saga-takex
v0.0.1
Published
A powerful take effect accepting RegExp instead of listing action types.
Downloads
101
Maintainers
Readme
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-takexThen 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 buildChangelog
See the Releases page on GitHub.
License
MIT
Author
Yuki Kodama / @kuy
