Objective: Implement a skeleton loader for content while waiting for an API response.
Example how it looks: Link ->
Instructions:
Create a component named ContentWithSkeleton
(or if you are not using React just create an HTML element).
The component should fetch data from any public API of your choice (or use https://jsonplaceholder.typicode.com/posts/1
as a default).
Display a skeleton loader while the data is being fetched. Once the data is fetched, replace the skeleton with the actual content.
Ensure that the skeleton loader is styled to resemble the structure of the content it will replace (e.g., rectangles for text blocks).
Requirements:
Hints:
Bonus:
shimmer effect
, to simulate loading.