-
-
Notifications
You must be signed in to change notification settings - Fork 429
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/remove unneccesary dependency array #1079
Fix/remove unneccesary dependency array #1079
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8ca766b
to
7b754d0
Compare
@rluders Please take a look at this, thanks.... |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1079 +/- ##
==========================================
- Coverage 99.54% 93.56% -5.99%
==========================================
Files 163 205 +42
Lines 6621 8545 +1924
Branches 401 468 +67
==========================================
+ Hits 6591 7995 +1404
- Misses 30 550 +520
☔ View full report in Codecov by Sentry. |
@paghar I wouldn't really call it "unnecessary" tho, It is there more for performance because we want to mount the listeners once, not every single render. One single downside that I can think of is the callback closure and possibly stale/outdated callback variables if they have from one execution to another, but here with this implementation, it is not the case. |
Agreed with @SutuSebastian. I think that we don't need this. But, thanks anyway. :) |
@rluders @SutuSebastian Thanks for the explanation, Is there any better solution to get rid of that warning? |
@paghar in this case, I think that we can just ignore it. |
@paghar I'll reopen the PR so, maybe you can just add the line to ignore the warning and it should be all. |
7b754d0
to
5e2c18e
Compare
5e2c18e
to
af25447
Compare
Done @rluders, |
U're most welcome! Sure, there is a solution, that is putting the callback |
Summarize the changes made and the motivation behind them.
Reference related issues using
#
followed by the issue number.If there are breaking API changes - like adding or removing props, or changing the structure of the theme - describe them, and provide steps to update existing code.