Skip to content

Releases: afitiskin/redux-saga-routines

Version 2.2.6

11 May 12:28
Compare
Choose a tag to compare
  • Update redux-action to version 2.6.5
  • Update dependencies to latest minor versions

Version 3.2.1

27 Aug 07:16
Compare
Choose a tag to compare

Security update (update dev dependencies)

Version 3.2.0

12 Jul 13:28
Compare
Choose a tag to compare

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

17 Oct 09:44
Compare
Choose a tag to compare
  • Update babel version

Version 3.1.1

05 Oct 13:01
Compare
Choose a tag to compare
  • Use stable version of Babel7 instead of beta

Version 3.1.0

04 Oct 15:53
Compare
Choose a tag to compare
  • Add ability to pass payloadCreator and metaCreator 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

04 Oct 15:21
Compare
Choose a tag to compare
  • Now bindRoutineToReduxForm supports optional second parameter noSuccessPayload. By default success payload is passed to promise' resolve. Using bindRoutineToReduxForm(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

04 Oct 15:19
Compare
Choose a tag to compare
  • Removed typescript definitions from the repo
  • Upgraded to babel 7

Version 2.2.5

22 May 09:43
Compare
Choose a tag to compare
  • Fixed typescript definitions broken in 2.2.4

Version 2.2.4 (deprecated)

22 May 09:44
Compare
Choose a tag to compare

Deprecated release (broken typescript definitions)