As in the Vue to do asynchronous rendering components?

There is a SPA app on Vue, which when you first start to boot for quite a long time. I would like this time to be reduced. Is there any asynchronous loading of components? First, draw something is a priority, and then the rest.
April 4th 20 at 13:00
2 answers
April 4th 20 at 13:02
Solution
And this?
Vue - Dillan.Hamm commented on April 4th 20 at 13:05
And it should be after the page load, when using for instance vue-router. - Donald_Vandervort commented on April 4th 20 at 13:08
@Donald_Vandervort, and this design, as written below? const Component = () => import('component'); - Dillan.Hamm commented on April 4th 20 at 13:11
It is for asynchronous loading of the component and not to an asynchronous connection / rendering. - Donald_Vandervort commented on April 4th 20 at 13:14
April 4th 20 at 13:04
Solution
Yes. Instead
import Component from 'component';

Use
const Component = () => import('component');

anywhere where you need lazy loading. Especially recommended for components routes vue-router
Will it help?
Vue - Dillan.Hamm commented on April 4th 20 at 13:07
@Dillan.Hamm, Dynamic and asynchronous components are two different things. The dynamic component may be asynchronous.

Asynchronous component — it's about loading component code.
Dynamic component — it's about rendering a component Vue.

I advise you to read more on this topic.

To view
https://youtu.be/5nr8zLo9hAg

That is, if your problem is in General bundle application.

If the problem is in complicated calculations on a single page — that's how they can be split into parts
https://youtu.be/5B66qer8cZo?t=705 - Valentin commented on April 4th 20 at 13:10
@Valentin, it is a Problem in large bundle. - Dillan.Hamm commented on April 4th 20 at 13:13
So the first video? - Dillan.Hamm commented on April 4th 20 at 13:16
@Dillan.Hamm, Yes - Valentin commented on April 4th 20 at 13:19

Find more questions by tags JavaScriptVue.js