FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/ant-design / Loading

Function: Loading()

Loading(props): Element

Render an Ant Design loading spinner with an optional content fallback.

Parameters

props

LoadingProps

Loading indicator props and optional wrapped children.

Returns

Element

Example

import { Loading } from '@faasjs/ant-design'

export function Page({ remoteData }: { remoteData?: string }) {
  return (
    <>
      <Loading />
      <Loading loading={!remoteData}>
        <div>{remoteData}</div>
      </Loading>
    </>
  )
}