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

Avoid unnecessary rerendering of MessageTableEntry component. #19899

Merged
merged 16 commits into from
Jul 18, 2024

Conversation

dennisoelkers
Copy link
Member

Note: This PR is based on #19896 which should be merged first.

Description

Motivation and Context

Prior to this PR, the MessageTableEntry component was rerendered whenever the route changes, due to using the useLocation hook. This can result in unnecessary rerenders. As this is used only for telemetry and therefore is relevant only at telemetry submission, this PR is pushing the retrieval of the current route to the actual telemetry submission function.

/nocl No user-facing change.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@dennisoelkers dennisoelkers force-pushed the fix/avoid-rerendering-of-message-table-entry branch 3 times, most recently from 836412b to a295e76 Compare July 12, 2024 12:32
@dennisoelkers dennisoelkers requested review from ousmaneo and linuspahl and removed request for ousmaneo July 12, 2024 12:37
@dennisoelkers dennisoelkers force-pushed the fix/avoid-rerendering-of-message-table-entry branch from a295e76 to b11e7e1 Compare July 16, 2024 06:09
@dennisoelkers dennisoelkers marked this pull request as ready for review July 16, 2024 08:01
@linuspahl linuspahl merged commit 12b41f8 into master Jul 18, 2024
6 checks passed
@linuspahl linuspahl deleted the fix/avoid-rerendering-of-message-table-entry branch July 18, 2024 09:58
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.

None yet

2 participants