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

project build error: missing useEffect dependency for assigned workflows #6217

Open
1 of 6 tasks
eatyourgreens opened this issue Aug 17, 2024 · 1 comment · May be fixed by #6219
Open
1 of 6 tasks

project build error: missing useEffect dependency for assigned workflows #6217

eatyourgreens opened this issue Aug 17, 2024 · 1 comment · May be fixed by #6219
Labels
bug Something isn't working

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Aug 17, 2024

Package

Choose from the list:

  • app-content-pages
  • app-project
  • lib-classifier
  • lib-panoptes-js
  • lib-react-components
  • unknown

Describe the bug

./src/hooks/useAssignedLevel.js
35:5  Warning: React Hook useEffect has a missing dependency: 'checkAssignedLevel'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

Missing dependencies in effect hooks lead to subtle bugs that can be hard to track down eg. the recent problems with the AnimatedNumber component were caused by a useEffect hook that didn't run when a dependency changed.

To Reproduce

Run yarn build for the project app.

Expected behavior

useEffect hooks must declare all reactive dependencies in their dependency array, or redefine dependencies so that they aren't reactive values.

@eatyourgreens eatyourgreens added the bug Something isn't working label Aug 17, 2024
@eatyourgreens eatyourgreens linked a pull request Aug 17, 2024 that will close this issue
12 tasks
@eatyourgreens
Copy link
Contributor Author

While working on #6219, I also discovered that the workflow assignment tests are broken in ClassifyPageContainer. I included a fix in that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant