Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Store): memoize selector arguments #1393

Merged
merged 1 commit into from
Nov 1, 2018

Conversation

timdeschryver
Copy link
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