Lazy-load a Vue async component or a React.lazy component
Answer: Vue has a defineAsyncComponent function so you can load a component from the server when it is needed. React lazy defers loading a component's code until it is rendered for the first time.
Vue defineAsyncComponent
Import defineAsyncComponent from vue and pass a function that returns a Promise for the component, often a dynamic import(). The guide presents this as a way to divide a large application into smaller chunks. The async component can then be used like any other component.
React lazy and Suspense
The React reference shows lazy(load) and lazy-loading components with Suspense, so a fallback can show while the code loads.
| defineAsyncComponent | lazy | |---|---| | defineAsyncComponent | Vue function that loads a component when needed | | lazy | React API that defers code until first render | | import() | Common way to return the component Promise | | Suspense | React fallback while the lazy component loads |
See also
Claims
- id: C1 claim: defineAsyncComponent loads a Vue component from the server only when it is needed. source: S1 evidence: "only load a component from the server when it's needed"
- id: C2 claim: The helper is defineAsyncComponent, imported from vue. source: S1 evidence: "Vue has a defineAsyncComponent function"
- id: C3 claim: React.lazy defers loading a component's code until it is rendered for the first time. source: S2 evidence: "defer loading component"
Sources
- [S1] Async Components. Vue docs. https://vuejs.org/guide/components/async.html . License: CC-BY-4.0. Accessed 2026-11-19.
- [S2] lazy. React docs. https://react.dev/reference/react/lazy . License: CC-BY-4.0. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Vue docs, Async Components; React docs, lazy. CC-BY-4.0; CC-BY-4.0. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vue docs, Async Components; React docs, lazy. CC-BY-4.0; CC-BY-4.0.
Cite this
iinventedlight. 2026. "Lazy-load a Vue async component or a React.lazy component." iinventedlight Library, iil:note:n08j5dh8, version of 2026-11-19. https://iinventedlight.com/library/notes/vue-async-components/. License: CC-BY-4.0.
@misc{iil_note_n08j5dh8,
author = {{iinventedlight}},
title = {{Lazy-load a Vue async component or a React.lazy component}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/vue-async-components/},
note = {Permanent ID iil:note:n08j5dh8. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- vue-async-components.table.json (table; CC-BY-4.0)
- vue-async-components.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vue-async-components.md.