frontend: Notifications: add missing dispatch dep to useEffect#5720
frontend: Notifications: add missing dispatch dep to useEffect#5720Swastik19Nit wants to merge 1 commit into
Conversation
|
|
|
Welcome @Swastik19Nit! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Swastik19Nit The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
illume
left a comment
There was a problem hiding this comment.
Thanks for these changes.
Can you please have a look at the git commits to see if they meet the contribution guidelines? We use a Linux kernel style of git commits. See the contributing guide for general context, and please see previous git commits with git log for examples.
Commits that need attention
frontend: Notifications: add missing dispatch dep to useEffect— Description must start with a capital letter — e.g.frontend: HomeButton: Fix the buttonnotfrontend: HomeButton: fix the button.
Commit guidelines
- Use atomic commits focused on a single change.
- Use the title format
<area>: <Description of changes>— description must start with a capital letter. - Keep the title under 72 characters (soft requirement).
- Explain the intention and why the change is needed.
- Make commit titles meaningful and describe what changed.
- Do not add code that a later commit rewrites; squash or reorder commits instead.
- Do not include
Fixes #NNin commit messages.
Good examples:
frontend: HomeButton: Fix so it navigates to homebackend: config: Add enable-dynamic-clusters flag
There was a problem hiding this comment.
Pull request overview
This PR removes a suppressed react-hooks/exhaustive-deps warning in the Notifications UI by adding the (stable) Redux dispatch function to a useEffect dependency array, aligning the code with hook dependency expectations without changing runtime behavior.
Changes:
- Adds
dispatchto theuseEffectdeps array in Notifications. - Removes the now-unnecessary eslint-disable for
react-hooks/exhaustive-deps.
2785c36 to
c1e26e2
Compare
|
fixed the commit message capitalization thanks for pointing that out |
dispatchwas used inside the effect but left out of the deps array with an eslint-disable comment. SincedispatchfromuseDispatch()is stable adding it has no behavior change.Part of #5183