Lazy Loading
Introduction
Reference
lazy(load)
lazy(load) import { lazy } from 'react';
const Cards = lazy(() => import('../components/Cards'));Usage
Lazy-loading components with Suspense
<Suspense fallback={<Loadings />}>
{
products.map((product) => (
<Cards
key={product.id}
url={product.images[0]}
desc={product.title}
id={product.id}
price={product.price}
/>
))
}
</Suspense>

Last updated