You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -165,7 +165,7 @@ class CounterContainer extends Component {
165
165
}
166
166
167
167
// Don't forget to actually use connect!
168
-
exportdefaultconnect(select)(CounterContainer);
168
+
exportdefaultconnect(mapState)(CounterContainer);
169
169
```
170
170
171
171
You can have many `connect()`-ed components in your app at any depth, and you can even nest them. It is however preferable that you try to only `connect()` top-level components such as route handlers, so the data flow in your application stays predictable.
Returns a component class that injects the Redux Store’s `dispatch` as a prop into `Component` so it can dispatch Redux actions.
226
319
227
-
The returned component also subscribes to the updates of Redux store. Any time the state changes, it calls the `select` function passed to it. The selector function takes a single argument of the entire Redux store’s state and returns an object to be passed as props. Use [reselect](https://github.com/faassen/reselect) to efficiently compose selectors and memoize derived data.
320
+
The returned component also subscribes to the updates of Redux store. Any time the state changes, it calls the `mapState` function passed to it. It is called a **selector**. The selector function takes a single argument of the entire Redux store’s state and returns an object to be passed as props. Use [reselect](https://github.com/faassen/reselect) to efficiently compose selectors and memoize derived data.
228
321
229
-
Both `dispatch` and every property returned by `select` will be provided to your `Component` as `props`.
322
+
Both `dispatch` and every property returned by `mapState` will be provided to your `Component` as `props`.
230
323
231
324
It is the responsibility of a Smart Component to bind action creators to the given `dispatch` function and pass those
232
325
bound creators to Dumb Components. Redux provides a `bindActionCreators` to streamline the process of binding action
@@ -236,9 +329,10 @@ creators to the dispatch function.
236
329
237
330
See the usage example in the quick start above.
238
331
239
-
### `Provider`
332
+
### `<Provider store>`
240
333
241
334
```js
335
+
// Make store available to connect() below in hierarchy
0 commit comments