How to use a Generator function with typescript? instead of async await? #3769
Unanswered
MiniSuperDev
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I write this two async await examples using a generator?
My goal is to reduce the boilerplate, I don't like to use the runInAction and and even less create a separate function
In the docs I see you recommend to use a generator https://mobx.js.org/actions.html#asynchronous-actions
But I don't know how to use it, please help me.
Thanks
And I have this other case where I read an
AsyncGenerator
from open ai chatHow can I use the mobx generator syntax?
I want to remove I want to remove all those
runInAction
Thanks
Beta Was this translation helpful? Give feedback.
All reactions