Skip to content

Update README #9

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The default export is a middleware function. If it receives a promise, it will d

If it receives an Flux Standard Action whose `payload` is a promise, it will either

- dispatch a copy of the action with the resolved value of the promise, and set `status` to `success`.
- dispatch a copy of the action with the rejected value of the promise, and set `status` to `error`.
- dispatch a copy of the action with the resolved value of the promise.
- dispatch a copy of the action with the rejected value of the promise, and set `error` to `true`.

The middleware returns a promise to the caller so that it can wait for the operation to finish before continuing. This is especially useful for server-side rendering. If you find that a promise is not being returned, ensure that all middleware before it in the chain is also returning its `next()` call to the caller.

Expand Down