From c37e6999b3cb0278a9423910585918699f3ba625 Mon Sep 17 00:00:00 2001 From: Yann Pringault Date: Mon, 8 Oct 2018 00:01:23 +0200 Subject: [PATCH] [Docs] Fix duplicated words in `mapState` --- docs/connect-extracting-data-with-mapStateToProps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/connect-extracting-data-with-mapStateToProps.md b/docs/connect-extracting-data-with-mapStateToProps.md index 3669bb64b..c2ba184fe 100644 --- a/docs/connect-extracting-data-with-mapStateToProps.md +++ b/docs/connect-extracting-data-with-mapStateToProps.md @@ -22,7 +22,7 @@ function mapStateToProps(state, ownProps?) It should take a first argument called `state`, optionally a second argument called `ownProps`, and return a plain object containing the data that the connected component needs. -This function should be passed as the first argument to `connect`, and will be will be called every time when the Redux store state changes. If you do not wish to subscribe to the store, pass `null` or `undefined` to `connect` in place of `mapStateToProps`. +This function should be passed as the first argument to `connect`, and will be called every time when the Redux store state changes. If you do not wish to subscribe to the store, pass `null` or `undefined` to `connect` in place of `mapStateToProps`. **It does not matter if a `mapStateToProps` function is written using the `function` keyword (`function mapState(state) { }` ) or as an arrow function (`const mapState = (state) => { }` )** - it will work the same either way. @@ -251,4 +251,4 @@ function mapStateToProps(...args) { - [Why Is My Component Re-Rendering Too Often?](https://redux.js.org/faq/reactredux#why-is-my-component-re-rendering-too-often) - [Why isn't my component re-rendering, or my mapStateToProps running](https://redux.js.org/faq/reactredux#why-isnt-my-component-re-rendering-or-my-mapstatetoprops-running) - [How can I speed up my mapStateToProps?](https://redux.js.org/faq/reactredux#why-is-my-component-re-rendering-too-often) -- [Should I only connect my top component, or can I connect multiple components in my tree?](https://redux.js.org/faq/reactredux#why-is-my-component-re-rendering-too-often) \ No newline at end of file +- [Should I only connect my top component, or can I connect multiple components in my tree?](https://redux.js.org/faq/reactredux#why-is-my-component-re-rendering-too-often)