You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey.
Nice work with the library! Though useEffect is supposed to return a function as an equivalent to componentDidUnmount, this doesn't seem to be the case with useEffectAsync since the API you've provided doesn't allow passing a function for cleanup.
The text was updated successfully, but these errors were encountered:
Will trigger the same problem of useEffect not supporting a non-functional return type since it's returning a promise object. I think there should be some sort of API that handles passing those cleanup functions, one that's different from how the original useEffect handles it.
This package for example takes cleanup function as a second optional argument in its useAsyncEffect hook: https://github.com/rauldeheer/use-async-effect
Hey.
Nice work with the library! Though useEffect is supposed to return a function as an equivalent to componentDidUnmount, this doesn't seem to be the case with useEffectAsync since the API you've provided doesn't allow passing a function for cleanup.
The text was updated successfully, but these errors were encountered: