For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/react.suspense.md.
这是开发预览网站。请访问正式文档 lynx-stack.dev

Home > @lynx-js/react > Suspense

Suspense variable

Lets you display a fallback until its children have finished loading.

Signature:

Suspense: typeof import('react').Suspense

Example

import { Suspense, lazy } from '@lynx-js/react';

const ProfileDetails = lazy(() => import('./ProfileDetails.jsx'));

<Suspense fallback={<Loading />}>
  <ProfileDetails />
</Suspense>