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' }, })