Stop Throwing, Start Returning: Why TypeScript Needs the Result Pattern
You've written this code a hundred times:
try {
const user = await fetchUser(id);
const posts = await fetchPosts(user.id);
const rendered = renderProfile(user, posts);
return rendered;
} catch
hex-di.hashnode.dev10 min read