-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(component-store): fix memoization not working when passing select…
…ors directly to select This makes selectors created with `createSelector` usable with `ComponentStore.select` which looks like it should work, but would previously result in the selector getting recomputed each time. When select method is called with a single argument, the projector function was being passed directly to `map`, which invokes its callback with an extra `index` argument. Because the value of index is always different, the memoized selector would get invalidated even if the actual state remained exactly the same.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters