Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for async actions #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ the action.
+ [`.caseWithAction(actionCreator, handler(state, action) => newState)`](#casewithactionactioncreator-handlerstate-action--newstate)
+ [`.cases(actionCreators, handler(state, payload) => newState)`](#casesactioncreators-handlerstate-payload--newstate)
+ [`.casesWithAction(actionCreators, handler(state, action) => newState)`](#caseswithactionactioncreators-handlerstate-action--newstate)
+ [`.caseWithAsyncAction(actionCreator, started, done, failed) `](#casewithasyncactionactioncreator-started-done-failed-)
+ [`casesWithAsyncFailure(actionCreators, failed)`](#caseswithasyncfailureactioncreators-failed)
+ [`.build()`](#build)

<!-- tocstop -->
Expand Down Expand Up @@ -298,6 +300,14 @@ reducerWithInitialState(initialState)
Like `.cases()`, except that the handler receives the entire action as its
second argument rather than just the payload.

#### `.caseWithAsyncAction(actionCreator, started, done, failed) `

Allows to register handlers for all async operations at once

#### `casesWithAsyncFailure(actionCreators, failed)`

Register failure handlers for all action creators

#### `.build()`

Returns a plain reducer function whose behavior matches the current state of the
Expand Down
Loading