Skip to content

Commit 441c73c

Browse files
committed
Update README.md
1 parent 0996a6b commit 441c73c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ A React component class that injects state and action creators into your compone
252252
export default connect()(TodoApp);
253253
```
254254

255-
##### Inject `dispatch` and every field in the global state (SLOW! TodoApp will rerender after each action)
255+
##### Inject `dispatch` and every field in the global state
256+
257+
>Don’t do this! It kills any performance optimisations because `TodoApp` will rerender after any action.
258+
>It’s better to have more granular `connect()` on several components in your view hierarchy.
259+
256260
```js
257261
export default connect(state => state)(TodoApp);
258262
```

0 commit comments

Comments
 (0)