Loadingcomponent
Loading(): ReactElement
| Return | |
|---|---|
ReactElement | The spinner element. |
Animated spinner SVG used as a loading indicator.
- Self-contained inline SVG with a rotating indicator arc; inherits its colour and size from the surrounding text.
An animated SVG spinner used as a loading indicator. Self-contained inline SVG with a rotating indicator arc that inherits its colour and size from the surrounding text.
Things to know:
- Takes no props.
LOADINGis a pre-keyed<Loading />element with a stablekey— drop it straight intoSuspensefallbacks and lists to avoid unnecessary reconciliation overhead.
Usage
import { Loading, LOADING } from "shelving/ui";
<Loading />
// Pre-keyed constant for fallbacks and lists.
<Suspense fallback={LOADING}>
<SlowComponent />
</Suspense>
{busy ? LOADING : children}Examples
<Loading />