Skip to content

Releases: FredericHeem/redux-act-async

Fat fighter

17 Mar 17:39
Compare
Choose a tag to compare

The function loadash.defaultdeep has been replaced by object-assign to save 4kB gzip.

rethrow => noRethrow

29 Aug 21:11
Compare
Choose a tag to compare

The exception is now thrown by default, override the behaviour with noRethrow

BREAKING API: return payload.response/error and payload.request

28 Jul 20:26
Compare
Choose a tag to compare

This is, unfortunately, a breaking API change. The ok and error action now provide an object containing the response/error and request which is the array of the input parameters

BEFORE:

let reducer = createReducer({
    [login.request]: (state, payload) => ({
        ...state,
        request: payload,
        loading: true,
        error: null
    }),
    [login.ok]: (state, payload) => ({
        ...state,
        loading: false,
        data: payload // Change to payload.response
    }),
    [login.error]: (state, payload) => ({
        ...state,
        loading: false,
        error: payload // Change to payload.error
    }),
}, defaultsState);

NOW:

let reducer = createReducer({
    [login.request]: (state, payload) => ({
        ...state,
        request: payload,
        loading: true,
        error: null
    }),
    [login.ok]: (state, payload) => ({
        ...state,
        loading: false,
        data: payload.response // payload.request is now available
    }),
    [login.error]: (state, payload) => ({
        ...state,
        loading: false,
        error: payload.error // payload.request is now available
    }),
}, defaultsState);

See https://github.com/FredericHeem/starhackit/pull/127/files for the changes of the Starhackit project.