For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/ui/components/deferred-component.md.
lynx-ui logo
lynx-ui
  • English
  • DeferredComponent

    Deferred rendering for ReactLynx. `DeferredComponent` mounts a child after the first layout or a configurable frame delay, with optional placeholder content.
    Info

    You can check the source code to understand how it works, and you're welcome to submit PRs to enhance its capabilities.

    Basic Usage

    Compare the default one-frame deferral with immediate rendering.

    Examples

    Delay Frames

    Keep a placeholder visible for a chosen frame count and observe later layout changes.

    Structure

    <DeferredComponent>
      {/* Your content */}
    </DeferredComponent>

    Component API

    DeferredComponent

    childreniOSAndroid
    TypeReactElement
    Child element to render after the delay.
    delayFramesiOSAndroid
    Typenumber·Default1
    Frames to delay rendering children. The first layout counts as the first frame. Values below 1 and non-finite values (NaN or either Infinity) render children immediately without a wrapper.
    estimatedStyleiOSAndroid
    TypeCSSProperties
    Estimated style applied to the wrapper before and after children appear.
    onLayoutChangeiOSAndroid
    Type(event: { width: number; height: number }) => void
    Called for wrapper layout events after children appear. The initial layout that starts the delay does not invoke this callback. Disabled delays render children directly and do not report wrapper layout events.
    placeholderiOSAndroid
    TypeReactElement<any, string | JSXElementConstructor<any>>
    Content displayed until the delayed children appear.
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.