Experience of developing a SPA on VueJS + Nuxt
Our company is mainly engaged in the development of online stores and we want to share our experience developing the project on a bundle of VueJS + Nuxt + Laravel.
The problem occurred when we in the asyncData method of our pages did several requisitioning.
Fortunately, nuxt developers quickly solved this problem, and at the moment the process consumes about 40mb of memory.
Interesting problems and their solutions
Articles with components
In the control panel of the site, it is possible to add articles and insert into the content of the article various blocks, for example a block with the goods.
The HTML that comes from the server looks something like this:
$ product-4 indicates that the Product.vue component with identifier 4 must be located at the location of this pointer. Vue provides us with ample opportunities to render the component using the render method. First, we look for all mentions of the pointers to the components in the html that came in, and we get the data required by api to display this component. Next, we split the entire html into a tree. In this we helped the library himalaya. And then we collect back html by replacing pointers to ready-made components.
And more strength to write an article was not enough) The article began to write in the summer of 2017 in the course of developing the project, and in the yard already summer 201? the project is launched, and the article is not released.
Therefore, we publish what we collected, but we still have many interesting topics, observations.
If it's interesting - write, put a husky) Well, what would it be interesting to hear more about what was missed.
I want to say that the project has been running for about 4 months. Special problems with it are not noticed, and the speed of the site's operation is impressive and favorably highlights it against the backdrop of other stores.
It may be interesting
Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. [Url = https: //mtsoul.net] 먹튀 검증 [/ url]