Replace anonymous useEffect functions with named functions#553
Conversation
|
Your tests are failing because of an eslint rule Just add a 'prefer-arrow-callback': 'off' line there with a comment
|
Codecov Report
@@ Coverage Diff @@
## main #553 +/- ##
==========================================
+ Coverage 36.37% 36.43% +0.06%
==========================================
Files 390 390
Lines 28577 28642 +65
Branches 6774 6777 +3
==========================================
+ Hits 10394 10436 +42
- Misses 17837 17860 +23
Partials 346 346
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Should probably change the eslint rule to just allowNamedFunctions instead of removing it entirely. Still prefer arrows over unnamed functions https://eslint.org/docs/rules/prefer-arrow-callback#allownamedfunctions |
mofojed
left a comment
There was a problem hiding this comment.
Rebase off the latest main as well. Let me know if you need help stepping through that.
packages/console/src/command-history/CommandHistoryViewportUpdater.tsx
Outdated
Show resolved
Hide resolved
| } | ||
| ); | ||
| useEffect( | ||
| function updateViewportAndReturnClaenup() { |
There was a problem hiding this comment.
| function updateViewportAndReturnClaenup() { | |
| function updateViewportAndReturnCleanup() { |
Added return cleanup function to useEffect in CardFlip Fixes deephaven#532
5386148 to
0cc2176
Compare
mofojed
left a comment
There was a problem hiding this comment.
Still need to update the typo in StorageTableViewportUpdater
Fixes #532