Wow, 1 minute well invested sir! I like how we’re basically:
- Creating a custom hook
- Using async/await pattern
- Made a reusable
fetchUrl
method.
Yes, for a “real app” I think adding a second config
param and error handling is all that’s needed for that provided you’re already in Babel / Webpack land with all the requisite shims. Thanks for this article…very helpful!