Build a Product Grid with Skeleton Loading
Modern web applications prioritize a seamless user experience, even during data fetching. When content takes time to load, displaying a blank screen can be jarring. Skeleton loaders provide a visual placeholder that mimics the layout of the actual content, giving users immediate feedback that content is on its way, thereby improving perceived performance and reducing user frustration. In this problem, you will implement a skeleton loader for a product display grid.
Your primary task is to enhance a simple product display page by implementing a skeleton loading state. Specifically, you need to:
ProductCard component: This component will display the details of a single product (image, name, description, price).SkeletonProductCard component: This component will serve as a visual placeholder for a ProductCard while data is loading. It should visually resemble the ProductCard's structure but with generic placeholder shapes.App component, simulate data fetching using the provided fetchProducts utility. During the loading phase, display multiple instances of the SkeletonProductCard.SkeletonProductCard instances with actual ProductCard components populated with the fetched data.SkeletonProductCard elements to indicate active loading.SkeletonProductCard should closely mirror the layout structure of the ProductCard. For instance, a large rectangle for the image, and several lines or smaller rectangles for text (title, description, price).SkeletonProductCard components.SkeletonProductCard components are replaced by actual ProductCard components displaying mock product data.ProductCard correctly renders the product's image, name, description, and price.SkeletonProductCard visually matches the layout of a ProductCard (e.g., placeholder for image, title, description, price).SkeletonProductCard components have a continuous, subtle CSS animation (e.g., shimmer or pulse).Constraints
setTimeout function, as provided in the starter code. You do not need to implement actual API calls.Loading editor...