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

Feature Request: Adding an optional cleanup function to allow async polling to be cancelled #9

Open
louisnow opened this issue Oct 6, 2019 · 0 comments

Comments

@louisnow
Copy link

louisnow commented Oct 6, 2019

Here's a question about something similar
I can make a pull request with an optional cleanup function and it would include no breaking changes. The implementation would be similar to this

Ideally this utility would accept an options object with delay as a key but this could be a potential pitfall. Every render would cause the interval to be reset if the options object is not defined with a useState or is defined in the function component directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant