-
Notifications
You must be signed in to change notification settings - Fork 5.5k
chore: Bump reselect to ^5.1.1 for heterogeneously-typed selectors support
#29094
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
chore: Bump reselect to ^5.1.1 for heterogeneously-typed selectors support
#29094
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
76747ea to
76f2574
Compare
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
reselect from ^3.0.1 to ^4.0.0reselect from ^3.0.1 to ^5.1.1
reselect from ^3.0.1 to ^5.1.1reselect to ^5.1.1 for heterogenously-typed selectors support
Builds ready [9025606]
Page Load Metrics (2023 ± 340 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [f286e48]
Page Load Metrics (1643 ± 63 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
|
|
||
| export const createDeepEqualSelector = createSelectorCreator( | ||
| defaultMemoize, | ||
| lruMemoize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, this implementation is the same under the hood right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! It was just renamed in v5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FrederikBolding
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snaps changes LGTM
reselect to ^5.1.1 for heterogenously-typed selectors supportreselect to ^5.1.1 for heterogeneously-typed selectors support
Motivation
Homogenous selector types:
Heterogenous selector types:
Support for heterogeneous typing is essential for selectors to function properly, because selectors must be both mergeable and atomic. Without heterogeneous selectors, these becoming conflicting objectives.
Mergeable:
Atomic:
Enabling merged selectors to accept different, even disjoint state types resolves this issue.
Note
See the
MultichainStatetype for an example of a bloated selector state type which will become unnecessary with this update.Description
[email protected]supports heterogeneous typing for selector inputs tocreateSelectorandcreateDeepEqualSelector.^5.1.1(latest) is necessary to fix type issues in4.0.0Related issues
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist