DEV Community

Discussion on: You Need to Try These 10 NPM Packages as a React Developer

Collapse
 
clydegrey profile image
Clyde

You used then for one example and async/await for the other. It's better if you want to show a like for like comparison that you stick to the same approach so that you can highlight just the differences between then two. This makes fetch seem more verbose and more difficult to read when most of that is due to await being more concise.

Thread Thread
 
itsnitinr profile image
Nitin Ranganath

You're right. Edited the example to use async-await in both cases. Thanks for notifying.