Skip to content

Commit 4c93c1f

Browse files
committed
Updated Middlewares docs.
1 parent 5495a02 commit 4c93c1f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/Middlewares.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Middlewares
2-
Middlewares are used when you want to do anything more than just change the state. It can be used to dispatch asynchronous actions for e.g. to load external data or perform a *side-effect* in the application.
2+
3+
Middlewares are used when you want to do anything more than just change the state. It can be used to dispatch asynchronous actions for e.g. to load external data or perform a side-effect in the application.
34

45
```js
56
const API_REQUEST = 'mymodule/REQUEST'
@@ -17,7 +18,7 @@ const mymodule = {
1718
}
1819
```
1920

20-
Just like you can do with reducers, you can also use an object for the middlewares when you want to listen to a single or multiple action types.
21+
Just like you can do with reducers, you can also use an object for middlewares, when you want to listen to a single or multiple action types:
2122

2223
```js
2324
const API_REQUEST = 'mymodule/REQUEST'
@@ -31,6 +32,6 @@ const mymodule = {
3132
}
3233
```
3334

34-
In middlewares you can dispatch an action using `next()` or `dispatch()`, see the [Side Effects](SideEffects.md) docs for better understanding on why and how to use them.
35+
Inside middlewares you can dispatch an action using `next()` or `dispatch()`, see the [Side Effects](SideEffects.md) documentation for better understanding on when and how to use them.
3536

36-
You can check Redux documentation for a more detailed documentation about Redux's [reducers](http://redux.js.org/docs/basics/Reducers.html) and [middlewares](http://redux.js.org/docs/advanced/Middleware.html).
37+
You can check Redux's documentation for a more detailed documentation about Redux's [middlewares](http://redux.js.org/docs/advanced/Middleware.html).

0 commit comments

Comments
 (0)