File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,14 @@ Returns the wrapped component instance. Only available if you pass `{ withRef: t
106
106
export default connect ()(TodoApp)
107
107
```
108
108
109
+ ##### Inject all action creators (` addTodo ` , ` completeTodo ` , ...) without subscribing to the store
110
+
111
+ ``` js
112
+ import * as actionCreators from ' ./actionCreators'
113
+
114
+ export default connect (null , actionCreators)(TodoApp)
115
+ ```
116
+
109
117
##### Inject ` dispatch ` and every field in the global state
110
118
111
119
> Don’t do this! It kills any performance optimizations because ` TodoApp ` will rerender after every action.
@@ -126,7 +134,7 @@ function mapStateToProps(state) {
126
134
export default connect (mapStateToProps)(TodoApp)
127
135
```
128
136
129
- ##### Inject ` todos ` and all action creators ( ` addTodo ` , ` completeTodo ` , ...)
137
+ ##### Inject ` todos ` and all action creators
130
138
131
139
``` js
132
140
import * as actionCreators from ' ./actionCreators'
You can’t perform that action at this time.
0 commit comments