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
## What does this PR do?
Regarding #1001, a few follow up fixes on the `mapState` piece.
## Summary of the changes
- Site header:
- Remove "Troubleshooting"
- Uppercase "API"
- Add "Using React-Redux" and let it direct to the `mapState` doc
- Site sidebar:
- Uppercase "API"
- Add a dash to "React-Redux"
- Site footer:
- Add "Using React-Redux"
- Align all link labels with section names on the sidebar
- Doc changes
- `<ConnectedTodo>` typo
- Changed a wording at the table for consistency
- Add "./using-react-redux" directory and move in mapState.md
- Add `array.slice` to the list of options that create new references
-[Idiomatic Redux: Using Reselect Selectors for Encapsulation and Performance](https://blog.isquaredsoftware.com/2017/12/idiomatic-redux-using-reselect-selectors/)
| `mapStateToProps` runs when: | store `state`is `===` different | store `state` changes <br /> or <br />any field of `ownProps` is different |
134
+
| `mapStateToProps` runs when: | store `state`changes | store `state` changes <br /> or <br />any field of `ownProps` is different |
135
135
| component re-renders when: | any field of `stateProps` is different | any field of `stateProps` is different <br /> or <br /> any field of `ownProps` is different |
136
136
137
137
@@ -143,6 +143,7 @@ Many common operations result in new object or array references being created:
143
143
144
144
- Creating new arrays with `someArray.map()` or `someArray.filter()`
145
145
- Merging arrays with `array.concat`
146
+
- Selecting portion of an array with `array.slice`
146
147
- Copying values with `Object.assign`
147
148
- Copying values with the spread operator `{ ...oldState, ...newData }`
148
149
@@ -223,16 +224,6 @@ function mapStateToProps(...args) {
223
224
}
224
225
```
225
226
226
-
227
-
228
-
229
-
<!--
230
-
## Next Up
231
-
- Connect: Dispatching Actions with `mapDispatchToProps` →
232
-
- Further optimizing `mapStateToProps` performances by writing memoized selectors or using Reselect →
0 commit comments