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(ui): memoize selectors for namespaces #1837

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

markphelps
Copy link
Collaborator

fixes: FLI-482

Selector selectNamespaces returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization 
Object { state: {…}, selected: (2) […], selected2: (2) […] }

https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization

@markphelps markphelps requested a review from a team as a code owner July 7, 2023 14:47
Copy link
Contributor

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know all the words, but dont fully understand the meaning 😂

@markphelps markphelps enabled auto-merge (squash) July 7, 2023 15:01
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #1837 (2679a1c) into main (e2faa04) will increase coverage by 0.10%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1837      +/-   ##
==========================================
+ Coverage   71.53%   71.64%   +0.10%     
==========================================
  Files          58       58              
  Lines        5501     5501              
==========================================
+ Hits         3935     3941       +6     
+ Misses       1339     1335       -4     
+ Partials      227      225       -2     

see 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@markphelps markphelps disabled auto-merge July 7, 2023 15:53
@markphelps markphelps merged commit 04a54df into main Jul 7, 2023
22 of 23 checks passed
@markphelps markphelps deleted the fix-memo-warning branch July 7, 2023 15:53
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.

3 participants