Skip to content

Commit 9526155

Browse files
committed
Tweak sidebar title and add memoization note
1 parent 979768b commit 9526155

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/connect-extracting-data-with-mapStateToProps.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
id: connect-extracting-data-with-mapStateToProps
3-
title: Connect: Extracting Data with `mapStateToProps`
3+
title: Connect: Extracting Data with mapStateToProps
44
hide_title: true
5-
sidebar_label: Connect: Extracting Data with `mapStateToProps`
5+
sidebar_label: Connect: Extracting Data with mapStateToProps
66
---
77

88
# Connect: Extracting Data with `mapStateToProps`
@@ -146,7 +146,7 @@ Many common operations result in new object or array references being created:
146146
- Copying values with `Object.assign`
147147
- Copying values with the spread operator `{ ...oldState, ...newData }`
148148
149-
Put these operation in [memoized selector functions]() to ensure that they only run if the input values have changed.
149+
Put these operations in [memoized selector functions]() to ensure that they only run if the input values have changed. This will also ensure that if the input values _haven't_ changed, `mapState` will still return the same result values as before, and `connect` can skip re-rendering.
150150
151151
152152

0 commit comments

Comments
 (0)