← All notes

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

Sources

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

Permanent ID: iil:note:n08j5dh8

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.},
}

Markdown

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.

All artifact files (JSON index)

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.