Closed
Bug 1849880
Opened 2 years ago
Closed 2 years ago
Home.jsx: ESLint warning 'React Hook useEffect has missing dependencies'
Categories
(Firefox :: Pocket, task)
Firefox
Pocket
Tracking
()
RESOLVED
FIXED
119 Branch
| Tracking | Status | |
|---|---|---|
| firefox119 | --- | fixed |
People
(Reporter: standard8, Assigned: thecount)
References
Details
Attachments
(1 file)
Running ESLint with warnings on browser/components/pocket/content/panels/js/components/Home/Home.jsx is currently giving a warning:
$ ./mach eslint --warnings browser/components/pocket/content/panels/js/components/Home/Home.jsx
browser/components/pocket/content/panels/js/components/Home/Home.jsx
71:6 warning React Hook useEffect has missing dependencies: 'articles' and 'hideRecentSaves'. Either include them or remove the dependency array. react-hooks/exhaustive-deps (eslint)
It looks like this code was added in bug 1797595.
I don't know enough about the code to know if these should be added, or if this rule should be ignored. Scott, could you take a look please?
Overall I'd like to change the rule from a warning to an error, since warnings tend to get ignored and never resolved.
Flags: needinfo?(sdowne)
| Assignee | ||
Updated•2 years ago
|
Assignee: nobody → sdowne
Flags: needinfo?(sdowne)
| Assignee | ||
Comment 1•2 years ago
|
||
Pushed by sdowne@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d0f462441a05
Save to Pocket fixing eslint dependencies warning around useEffect. r=gvn
Comment 3•2 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox119:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•