Promise Tips: When do I need to create my own Promise instance?
Promises are pretty ubiquitous these days, but sometimes Promise based code is more complex that it needs to be.
Consider this getUserDetails function:
function getUserDetails(userId) {
return new Promise((resolve, reject) => {
fetch(`/users/${...
joeattardi.dev4 min read