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: no extra calculation with nested memoized selectors #92

Merged
merged 7 commits into from
Jan 15, 2024
Merged

Conversation

dai-shi
Copy link
Owner

@dai-shi dai-shi commented Dec 29, 2023

fix #91.

@dai-shi dai-shi changed the title Add a failing step for #91 Add a failing test for #91 Dec 29, 2023
Copy link

codesandbox-ci bot commented Dec 29, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a0a2886:

Sandbox Source
Vanilla Typescript Configuration
React Configuration
React TypeScript Configuration

@dai-shi
Copy link
Owner Author

dai-shi commented Dec 29, 2023

I don't think it's solvable without breaking existing reasonable behaviors.
From the library perspective, it doesn't know if it should return a cached value or a new value for different invocations from different parents.

@dai-shi
Copy link
Owner Author

dai-shi commented Dec 29, 2023

A custom comparator might work. 🤔

@dai-shi dai-shi changed the title Add a failing test for #91 fix: no extra calculation with nested memoized selectors Dec 30, 2023
@dai-shi dai-shi mentioned this pull request Jan 12, 2024
@dai-shi dai-shi marked this pull request as ready for review January 15, 2024 05:53
@dai-shi dai-shi merged commit 551ae15 into main Jan 15, 2024
3 checks passed
@dai-shi dai-shi deleted the fix/issue-91 branch January 15, 2024 05:55
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.

Extra calculations
1 participant