-
-
Notifications
You must be signed in to change notification settings - Fork 179
Use async functions instead of promises #447
Comments
Seems like a good idea. Would you mind doing a PR for that? @jhipster/vuejs-developers wdyt? |
Possibly - let's see how far I get |
@mrts have you found time to work on this? If not, I could take it to work with in the next one or two weeks. |
I don't know Vue.js enough to tell if it's the right way or not. |
I discussed it with @Gnuk: |
@antonioortizpola nope, sorry, I don't currently have time. Please go ahead - and good luck :)! Note that you have to use try/catch, try/finally is incomplete. |
@nonomoho glad you like this, but can you elaborate why you don't like try/catch? |
It's juste personal, I think |
Coming from C# await seems way more natural to me, what is the "standard" or the more used way in JS and Vue? |
Overview of the feature request
Use async/await instead of promises for more succinct code.
For example, instead of the following JHipster-generated code
do this:
Note that I've left out
catch
for purely aesthetic reasons - it is still actually required.Motivation for or Use Case
Quoting Google Developers async functions primer:
The text was updated successfully, but these errors were encountered: