A couple of months ago at work, we’ve decided to go all-in on Composition API with a new version of our product. And from what I can tell — looking around at new plugins appearing, all the discussions in the discord community — the composition API gets increasingly more popular. It’s not just us.
A couple of months ago at work, we’ve decided to go all-in on Composition API with a new version of our product.
And from what I can tell — looking around at new plugins appearing, all the discussions in the discord community — the composition API gets increasingly more popular. It’s not just us.
Composition API makes a lot of things easier but it also brings some challenges as some things need to be rethought regarding how they fit into this new concept and it might take some time before the best practices are established.
One of the challenges is managing state, especially when asynchrony is involved.
I’ll try to showcase different approaches for this, including vue-concurrency, which I’ve created and that I maintain.
You might ask what’s there to manage? Composition API is flexible enough, this shouldn’t be a problem.
The most typical asynchronous operation is doing an AJAX request to the server. In the past years, some generic issues of AJAX have been solved or mitigated. The callback hell was extinguished with Promises and those were later sugared into async/await. Async/await is pretty awesome and the code is a joy to read compared to the original callback hell spaghetti that was often written years before.
But the fact, that things are much better now doesn’t mean that there’s no more space for improvement.
Want to Hire VueJS Developer to develop an amazing app? **[Hire Dedicated VueJS Developers](https://hourlydeveloper.io/hire-dedicated-vue-js-developer/ "Hire Dedicated VueJS Developers")** on the contract (time/project) basis providing regular...
Our expert Vue.js developers follows Agile methodology that delivers high-quality & affordable Vue.js services. Hire Vue.js Developer from Skenix Infotech.
In this article, I am going to talk about best practices to follow when structuring the project’s frontend architecture, writing front-end code, and preparing for deployment. Front-End Web Development Best Practices
According to the survey Vue.js is the front-end library that developers would most like to learn.