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

Add cleanups to useEffect() calls with callbacks #876

Open
divergentdave opened this issue Mar 14, 2024 · 0 comments
Open

Add cleanups to useEffect() calls with callbacks #876

divergentdave opened this issue Mar 14, 2024 · 0 comments
Labels
Chore A task that produces no visible business value React App

Comments

@divergentdave
Copy link
Contributor

There are a few useEffect() calls that take a promise and call then() on it. (These are in TaskTitle(), AccountName(), and usePromise()). There's also one in ErrorPage, but it's moot because the effect navigates away from the app.) These should return cleanup functions, following the usual cancellation flag pattern. It's possible that rapid clicks, plus HTTP requests completing out of order, could lead to confusing UI interactions, and ignoring promise resolutions from old invocations of effects will fix these potential issues.

@divergentdave divergentdave added React App Chore A task that produces no visible business value labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore A task that produces no visible business value React App
Projects
None yet
Development

No branches or pull requests

1 participant