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

Check function in useIsAuthenticated changes too frequently leading to continuous loops if added to dependencies #1905

Closed
AlinaGoaga opened this issue Apr 12, 2022 · 0 comments · Fixed by #2142
Assignees
Labels
bug Something isn't working team/pesto

Comments

@AlinaGoaga
Copy link
Contributor

AlinaGoaga commented Apr 12, 2022

Describe the bug

req: check in the useIsAuthenticated hook is an anonymous function that keeps changing so we can't use it as a dependency without causing loops

Is this a UI bug or a server bug?

  • UI

What is the severity of the bug

  • severity/Low: Doesn’t affect primary flow/functionality but would be good to fix

Environment

Main prior to the removal of AddApplication.

To Reproduce

Add check as a dependency to useEffect in the AddApplication component.

Expected behavior

We should we able to add the dependency without causing a loop. To solve this we'll be wrapping req in useIsAuthenticated in a useCallback to limit the amount of times the function changes.

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