---
title: "Dynamic and async components · vuejs.school"
description: "Switch components with :is, keep their state with KeepAlive, and download heavy ones only when needed with defineAsyncComponent()."
canonical_url: "https://vuejs.school/learn/advanced/dynamic-and-async-components"
meta:
  "og:description": "Switch components with :is, keep their state with KeepAlive, and download heavy ones only when needed with defineAsyncComponent()."
  "og:image": "https://vuejs.school/_og/d/a_~RHluYW1pYyBhbmQgYXN5bmMgY29tcG9uZW50cyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Dynamic%2Band%2Basync%2Bcomponents%2Cdescription_~U3dpdGNoIGNvbXBvbmVudHMgd2l0aCA6aXMsIGtlZXAgdGhlaXIgc3RhdGUgd2l0aCBLZWVwQWxpdmUsIGFuZCBkb3dubG9hZCBoZWF2eSBvbmVzIG9ubHkgd2hlbiBuZWVkZWQgd2l0aCBkZWZpbmVBc3luY0NvbXBvbmVudCgpLg%2Ceyebrow_~QWR2YW5jZWQgVnVlIMK3IExlc3NvbiA2IG9mIDEx%2Ctint_lilac%2Cp_Ii9sZWFybi9hZHZhbmNlZC9keW5hbWljLWFuZC1hc3luYy1jb21wb25lbnRzIg%2Cs_5AXiwufAAKfQKz9R.png"
  "og:image:alt": "Dynamic and async components · vuejs.school"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Dynamic and async components · vuejs.school"
  "twitter:image": "https://vuejs.school/_og/d/a_~RHluYW1pYyBhbmQgYXN5bmMgY29tcG9uZW50cyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Dynamic%2Band%2Basync%2Bcomponents%2Cdescription_~U3dpdGNoIGNvbXBvbmVudHMgd2l0aCA6aXMsIGtlZXAgdGhlaXIgc3RhdGUgd2l0aCBLZWVwQWxpdmUsIGFuZCBkb3dubG9hZCBoZWF2eSBvbmVzIG9ubHkgd2hlbiBuZWVkZWQgd2l0aCBkZWZpbmVBc3luY0NvbXBvbmVudCgpLg%2Ceyebrow_~QWR2YW5jZWQgVnVlIMK3IExlc3NvbiA2IG9mIDEx%2Ctint_lilac%2Cp_Ii9sZWFybi9hZHZhbmNlZC9keW5hbWljLWFuZC1hc3luYy1jb21wb25lbnRzIg%2Cs_5AXiwufAAKfQKz9R.png"
  "twitter:image:alt": "Dynamic and async components · vuejs.school"
---

> Index of every page on this site: [llms.txt](https://vuejs.school/llms.txt)

# **Dynamic and async components**

Switch components with :is, keep their state with KeepAlive, and download heavy ones only when needed with defineAsyncComponent().

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://vuejs.school/#website","@type":"WebSite","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school/","publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/advanced/dynamic-and-async-components#webpage","@type":"WebPage","description":"Switch components with :is, keep their state with KeepAlive, and download heavy ones only when needed with defineAsyncComponent().","name":"Dynamic and async components","url":"https://vuejs.school/learn/advanced/dynamic-and-async-components","breadcrumb":{"@id":"https://vuejs.school/learn/advanced/dynamic-and-async-components#breadcrumb"},"isPartOf":{"@id":"https://vuejs.school/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://vuejs.school/learn/advanced/dynamic-and-async-components"]}],"primaryImageOfPage":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/#identity","@type":"Organization","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school","logo":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/learn/advanced/dynamic-and-async-components#article","description":"Switch components with :is, keep their state with KeepAlive, and download heavy ones only when needed with defineAsyncComponent().","headline":"Dynamic and async components","inLanguage":"en","isAccessibleForFree":true,"thumbnailUrl":"https://vuejs.school/_og/d/a_~RHluYW1pYyBhbmQgYXN5bmMgY29tcG9uZW50cyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Dynamic%2Band%2Basync%2Bcomponents%2Cdescription_~U3dpdGNoIGNvbXBvbmVudHMgd2l0aCA6aXMsIGtlZXAgdGhlaXIgc3RhdGUgd2l0aCBLZWVwQWxpdmUsIGFuZCBkb3dubG9hZCBoZWF2eSBvbmVzIG9ubHkgd2hlbiBuZWVkZWQgd2l0aCBkZWZpbmVBc3luY0NvbXBvbmVudCgpLg%2Ceyebrow_~QWR2YW5jZWQgVnVlIMK3IExlc3NvbiA2IG9mIDEx%2Ctint_lilac%2Cp_Ii9sZWFybi9hZHZhbmNlZC9keW5hbWljLWFuZC1hc3luYy1jb21wb25lbnRzIg%2Cs_5AXiwufAAKfQKz9R.png","@type":["Article","TechArticle"],"articleSection":["Components"],"author":{"@id":"https://vuejs.school/#identity"},"image":{"@id":"https://vuejs.school/#/schema/image/1"},"isPartOf":{"@id":"https://vuejs.school/learn/advanced/dynamic-and-async-components#webpage"},"keywords":["\u003Ccomponent :is>","\u003CKeepAlive>","defineAsyncComponent()","lazy loading"],"mainEntityOfPage":{"@id":"https://vuejs.school/learn/advanced/dynamic-and-async-components#webpage"},"publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/advanced/dynamic-and-async-components#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Skill tree","item":"https://vuejs.school/track","position":1},{"@type":"ListItem","name":"Advanced Vue","item":"https://vuejs.school/track/advanced","position":2},{"@type":"ListItem","name":"Dynamic and async components","position":3}]},{"@id":"https://vuejs.school/#logo","@type":"ImageObject","caption":"vuejs.school","contentUrl":"https://vuejs.school/apple-touch-icon.png","inLanguage":"en","url":"https://vuejs.school/apple-touch-icon.png"},{"@id":"https://vuejs.school/#/schema/image/1","@type":"ImageObject","contentUrl":"https://vuejs.school/_og/d/a_~RHluYW1pYyBhbmQgYXN5bmMgY29tcG9uZW50cyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Dynamic%2Band%2Basync%2Bcomponents%2Cdescription_~U3dpdGNoIGNvbXBvbmVudHMgd2l0aCA6aXMsIGtlZXAgdGhlaXIgc3RhdGUgd2l0aCBLZWVwQWxpdmUsIGFuZCBkb3dubG9hZCBoZWF2eSBvbmVzIG9ubHkgd2hlbiBuZWVkZWQgd2l0aCBkZWZpbmVBc3luY0NvbXBvbmVudCgpLg%2Ceyebrow_~QWR2YW5jZWQgVnVlIMK3IExlc3NvbiA2IG9mIDEx%2Ctint_lilac%2Cp_Ii9sZWFybi9hZHZhbmNlZC9keW5hbWljLWFuZC1hc3luYy1jb21wb25lbnRzIg%2Cs_5AXiwufAAKfQKz9R.png","inLanguage":"en","url":"https://vuejs.school/_og/d/a_~RHluYW1pYyBhbmQgYXN5bmMgY29tcG9uZW50cyDCtyB2dWVqcy5zY2hvb2w%2Cc_OgCard.takumi%2Ctitle_Dynamic%2Band%2Basync%2Bcomponents%2Cdescription_~U3dpdGNoIGNvbXBvbmVudHMgd2l0aCA6aXMsIGtlZXAgdGhlaXIgc3RhdGUgd2l0aCBLZWVwQWxpdmUsIGFuZCBkb3dubG9hZCBoZWF2eSBvbmVzIG9ubHkgd2hlbiBuZWVkZWQgd2l0aCBkZWZpbmVBc3luY0NvbXBvbmVudCgpLg%2Ceyebrow_~QWR2YW5jZWQgVnVlIMK3IExlc3NvbiA2IG9mIDEx%2Ctint_lilac%2Cp_Ii9sZWFybi9hZHZhbmNlZC9keW5hbWljLWFuZC1hc3luYy1jb21wb25lbnRzIg%2Cs_5AXiwufAAKfQKz9R.png"}]}
```