Vue.js Pattern for Async Requests: Using Renderless Components
Lukas Hermann has a good tutorial on how to use Vue.js Pattern for Async Requests.
While a simple request is very easy with axios, we usually want to cover at least two additional states:
Show something to the user while the request is pending Handle errors gracefully Handling these states adds additional code and can quickly lead to code-duplication when having to implement many different requests.
This post is submitted by one of our members. You may submit a new post here.