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

refactor: fix selector memoization warning #5436

Merged

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented May 16, 2024

Done

  • refactor: fix selector memoization warning
stderr | src/app/subnets/views/VLANDetails/DHCPStatus/DHCPStatus.test.tsx > shows a spinner if data is loading
Selector unknown 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

QA steps

  • Go to tags page
  • Verify it's displayed without errors

Fixes

Fixes:

Screenshots

Notes

Signed-off-by: Peter Makowski <me+git@petermakowski.io>
@webteam-app
Copy link

@petermakowski petermakowski marked this pull request as ready for review May 16, 2024 14:37
@petermakowski petermakowski requested a review from ndv99 May 17, 2024 09:09
@ndv99 ndv99 added Review: QA +1 Review: Core +1 MAAS core team have approved this in QA Review: Code +1 and removed Review: Code needed Review: QA needed Review: Core +1 MAAS core team have approved this in QA labels May 17, 2024
Copy link
Contributor

@ndv99 ndv99 left a comment

Choose a reason for hiding this comment

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

LGTM

@petermakowski petermakowski merged commit 527c03e into canonical:main May 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants