Skip to content

Commit 13f43da

Browse files
committed
clarify state => state mapping admonition
clarifying admonition against listening to the entire state in `connect()` resolves reduxjs#83
1 parent 66d9286 commit 13f43da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ export default connect()(TodoApp);
267267
##### Inject `dispatch` and every field in the global state
268268

269269
>Don’t do this! It kills any performance optimisations because `TodoApp` will rerender after every action.
270-
>It’s better to have more granular `connect()` on several components in your view hierarchy.
270+
>It’s better to have more granular `connect()` on several components in your view hierarchy that each only
271+
>listen to a relevant slice of the state.
271272
272273
```js
273274
export default connect(state => state)(TodoApp);

0 commit comments

Comments
 (0)