Skip to content

Commit

Permalink
Update connect.md
Browse files Browse the repository at this point in the history
remove extra space in connect.md
  • Loading branch information
jspurlin authored Aug 29, 2022
1 parent fa597b5 commit 034e077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const areStatesEqual = (next, prev) =>
prev.entities.todos === next.entities.todos
```
You may wish to override `areStatesEqual` if your `mapStateToProps` function is computationally expensive and is also only concerned with a small slice of your state. The example above will effectively ignore state changes for everything but that slice of state. Additionally, `areStatesEqual` provides `nextOwnProps` and `prevOwnProps` to allow for more effective scoping of your state which your connected component is interested in, if needed.
You may wish to override `areStatesEqual` if your `mapStateToProps` function is computationally expensive and is also only concerned with a small slice of your state. The example above will effectively ignore state changes for everything but that slice of state. Additionally, `areStatesEqual` provides `nextOwnProps` and `prevOwnProps` to allow for more effective scoping of your state which your connected component is interested in, if needed.
This would likely impact the other equality checks as well, depending on your `mapStateToProps` function.
Expand Down

0 comments on commit 034e077

Please sign in to comment.