Releases: afitiskin/redux-saga-routines
Version 2.2.6
Version 3.2.1
Security update (update dev dependencies)
Version 3.2.0
Introducing createRoutineCreator
that can be used to create your own routines.
createRoutine
and other custom routine creators are now exposes STAGES
attribute with list of all routine stages. Routine by itself has 2 new params: routine._PREFIX
and routine._STAGES
that may be useful in some cases.
Thanks @shapkarin for the help with this updates
Version 3.1.2
- Update babel version
Version 3.1.1
- Use stable version of Babel7 instead of beta
Version 3.1.0
-
Add ability to pass
payloadCreator
andmetaCreator
as objects to define specific payload and meta creators for each routine action. This changes are fully backward compatible.const myRoutine = createRoutine('SOME/PREFIX', { trigger: (payload) => payload * 2, request: (payload) => payload * 3, success: (payload) => payload * 4, failure: (payload) => payload * 5, fulfill: (payload) => payload * 6, }, { trigger: () => { info: 'trigger action meta' }, request: () => { info: 'request action meta' }, success: () => { info: 'success action meta' }, failure: () => { info: 'failure action meta' }, fulfill: () => { info: 'fulfill action meta' }, })
Version 3.0.1
-
Now
bindRoutineToReduxForm
supports optional second parameternoSuccessPayload
. By default success payload is passed to promise'resolve
. UsingbindRoutineToReduxForm(routine, true)
you are able to preserve old behaviour: payload will not be passed to promise'resolve
.const routine = createRoutine('SOME/ROUTINE'); // default behaviour: success payload will be passed to promise resolver const handler = bindRoutineToReduxForm(routine); // no second param passed const promise = handler(payload, dispatch); // manually dispatch trigger action by calling our handler dispatch(routine.success({ data: 42 })); // manually dispatch success action with some payload promise.success((successPayload) => console.log(successPayload)); // { data: 42 } // old version compatible behaviour: success payload will NOT be passed to promise resolver const compatibleHandler = bindRoutineToReduxForm(routine, true); // true as a second param means NO SUCCESS PAYLOAD const compatiblePromise = compatibleHandler(payload, dispatch); // manually dispatch trigger action by calling our handler dispatch(routine.success({ data: 42 })); // manually dispatch success action with some payload promise.success((successPayload) => console.log(successPayload)); // undefined
Version 3.0.0
- Removed typescript definitions from the repo
- Upgraded to babel 7
Version 2.2.5
- Fixed typescript definitions broken in 2.2.4
Version 2.2.4 (deprecated)
Deprecated release (broken typescript definitions)