-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
useAsyncFn: keeping the previous state when start running the async function #934
Comments
…art running the async function
Hello there, I feel like merging the state of various function executions can be a bit messy. Did you think about holding multiple states ? Maybe returning a state reference at each execution ? What is your use case ? Cheers, |
Hi @Granipouss, You are right, maybe I can custom the hook myself without modifying the useAsyncFn, Actually I did, I will close the issue and PR if you feeling keeping the value will be a bit messy, it's fine for me. |
I would wait for other opinions before closing it all |
This PR has been merged, close the issue. |
🎉 This issue has been resolved in version 15.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Is your feature request related to a problem? Please describe.
the initialState.value of useAsyncFn will be clean when start running the async function
Describe the solution you'd like
keep the previous state unless
loading
property when start running the async functionThe text was updated successfully, but these errors were encountered: