Skip to content

Commit d3eeaa0

Browse files
paldepindtimdorr
authored andcommitted
Mention redux-saga (reduxjs#1842)
Remove "for most common needs" because `fetch` replaces `XMLHttpRequest` in its entirety. Men redux-saga because it is worth mentioning.
1 parent 32af1cb commit d3eeaa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/advanced/AsyncActions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ store.dispatch(fetchPostsIfNeeded('reactjs')).then(() =>
490490
491491
>Async action creators are especially convenient for server rendering. You can create a store, dispatch a single async action creator that dispatches other async action creators to fetch data for a whole section of your app, and only render after the Promise it returns, completes. Then your store will already be hydrated with the state you need before rendering.
492492
493-
[Thunk middleware](https://github.com/gaearon/redux-thunk) isn’t the only way to orchestrate asynchronous actions in Redux. You can use [redux-promise](https://github.com/acdlite/redux-promise) or [redux-promise-middleware](https://github.com/pburtchaell/redux-promise-middleware) to dispatch Promises instead of functions. You can dispatch Observables with [redux-rx](https://github.com/acdlite/redux-rx). You can even write a custom middleware to describe calls to your API, like the [real world example](../introduction/Examples.md#real-world) does. It is up to you to try a few options, choose a convention you like, and follow it, whether with, or without the middleware.
493+
[Thunk middleware](https://github.com/gaearon/redux-thunk) isn’t the only way to orchestrate asynchronous actions in Redux. You can use [redux-promise](https://github.com/acdlite/redux-promise) or [redux-promise-middleware](https://github.com/pburtchaell/redux-promise-middleware) to dispatch Promises instead of functions. You can use the side effects middleware [redux-saga](https://github.com/yelouafi/redux-saga/) that preserves actions as plain objects. You can dispatch Observables with [redux-rx](https://github.com/acdlite/redux-rx). You can even write a custom middleware to describe calls to your API, like the [real world example](../introduction/Examples.md#real-world) does. It is up to you to try a few options, choose a convention you like, and follow it, whether with, or without the middleware.
494494

495495
## Connecting to UI
496496

0 commit comments

Comments
 (0)