DEV Community


Discussion on: Async code: return vs return await

ivandotv profile image
Ivan V. Author • Edited

Sorry for a late reply (notifications on are crazy stupid).

In case of return await it will have one more microtask, you can think of it as one more then() added to the promise chain. So if you need to catch the error that is what you should use. If you plan on handling errors somewhere else in your code then just use return (without await).

tanvirrb profile image
Tanvir Islam

thank you <3