Last active
April 7, 2024 20:08
-
-
Save kenny-io/f0b0845f8e5f3a2d6bea024d7f3e9310 to your computer and use it in GitHub Desktop.
Revisions
-
kenny-io revised this gist
Apr 7, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ import { lazy, Suspense } from 'react'; const ProductDetails = lazy(() => import('./ProductDetails')); -
kenny-io created this gist
Apr 7, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ import React, { lazy, Suspense } from 'react'; const ProductDetails = lazy(() => import('./ProductDetails')); function ProductListing({ products }) { return ( <Suspense fallback={<div>Loading...</div>}> <ul> {products.map((product) => ( <li key={product.id}> <ProductDetails product={product} /> </li> ))} </ul> </Suspense> ); }