This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
Releases: FredericHeem/redux-act-async
Releases · FredericHeem/redux-act-async
Fat fighter
The function loadash.defaultdeep
has been replaced by object-assign
to save 4kB gzip.
rethrow => noRethrow
The exception is now thrown by default, override the behaviour with noRethrow
BREAKING API: return payload.response/error and payload.request
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.