File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,21 +15,21 @@ Multiple middleware can be composed manually
15
15
middleware1 (middleware2 (dispatch))(action)
16
16
```
17
17
18
- Or using the provided ` compose ()` utility:
18
+ Or using the provided ` composeMiddleware ()` utility:
19
19
20
20
``` js
21
- import { compose } from ' redux' ;
21
+ import { composeMiddleware } from ' redux' ;
22
22
23
23
// All are equivalent:
24
24
middleware1 (middleware2 (dispatch))(action)
25
- compose (middleware1, middleware2)(dispatch)(action)
26
- compose (middleware1, middleware2, dispatch)(action)
25
+ composeMiddleware (middleware1, middleware2)(dispatch)(action)
26
+ composeMiddleware (middleware1, middleware2, dispatch)(action)
27
27
```
28
28
29
- ` compose ` enables you to easily compose an array of middleware using spread notation:
29
+ ` composeMiddleware ` enables you to easily compose an array of middleware using spread notation:
30
30
31
31
```
32
- compose (...middlewares);
32
+ composeMiddleware (...middlewares);
33
33
```
34
34
35
35
## Example of how to write middleware
You can’t perform that action at this time.
0 commit comments