Skip to content

fix(Store): memoize selector arguments#1393

Merged
brandonroberts merged 1 commit into
masterfrom
pr/memoize-selector-arguments
Nov 1, 2018
Merged

fix(Store): memoize selector arguments#1393
brandonroberts merged 1 commit into
masterfrom
pr/memoize-selector-arguments

Conversation

@timdeschryver

Copy link
Copy Markdown
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #1389
This was also being addressed in #1194 (comment) but was forgotten.

What is the new behavior?

The arguments weren't being memoized when the result of the selector was equal to its previous result.

This fix moves the memoization of the arguments before the check if the results are equal.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Closes #1389

The arguments weren't being memoized when the result of the selector was equal to its previous result
This fix moves the memoization of the arguments before the check if the results are equal
@brandonroberts brandonroberts merged commit 7cc9702 into master Nov 1, 2018
@brandonroberts brandonroberts deleted the pr/memoize-selector-arguments branch November 1, 2018 12:08
@timdeschryver timdeschryver restored the pr/memoize-selector-arguments branch March 27, 2019 21:35
@timdeschryver timdeschryver deleted the pr/memoize-selector-arguments branch March 27, 2019 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selector function runs multiple times even though arguments have not changed

2 participants