DEV Community

Discussion on: 5 Async/Await Design Patterns for Cleaner Async Logic

Collapse
 
masteringjs profile image
Mastering JS

The problem is that you need to do await res.json() as well, but otherwise your approach works. I think the await fetch().then(res => res.json()) pattern is common enough that it's worth mentioning.