20CAKE20.JS
06-components

Components

23

06-components/13-lazy-options.tsx

Lazy Options

Example

Official Cake20 View example for lazy options.

const Report = lazy({
  load: () => import("./ReportPanel"),
  loading: () => <p>Loading report...</p>,
  error: () => <p>Failed to load the report.</p>,
  delay: 200,
  timeout: 3000,
  retry: 2,
});

export default () => <Report />;