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: Plugins were re-registering on every re-render #1613

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

mofojed
Copy link
Member

@mofojed mofojed commented Nov 2, 2023

  • Forgot dependency array for useEffect hook

- Forgot dependency array for `useEffect` hook
@mofojed mofojed requested a review from mattrunyon November 2, 2023 14:09
@mofojed mofojed self-assigned this Nov 2, 2023
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (787c542) 46.68% compared to head (3631732) 46.68%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1613   +/-   ##
=======================================
  Coverage   46.68%   46.68%           
=======================================
  Files         583      583           
  Lines       36267    36267           
  Branches     9074     9074           
=======================================
  Hits        16930    16930           
  Misses      19285    19285           
  Partials       52       52           
Flag Coverage Δ
unit 46.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../dashboard-core-plugins/src/WidgetLoaderPlugin.tsx 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

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

Didn't realize the linter doesn't catch the case where you accidentally omit the dependency array

@mofojed
Copy link
Member Author

mofojed commented Nov 2, 2023

Didn't realize the linter doesn't catch the case where you accidentally omit the dependency array

Yea same. I don't know if this behaviour changed in React or in our linter? Without the dependency array, it re-runs every render.

@mofojed mofojed merged commit 5977389 into deephaven:main Nov 2, 2023
@mofojed mofojed deleted the 1612-dashboard-reregister branch November 2, 2023 16:12
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DashboardLayout re-registering components whenever layout is changed
2 participants