All Challenges

Infinite Scroll Feed with Skeleton Shimmer

ReactMediumInstagramLinkedInSwiggy
45:00

Problem Brief

Build an async feed that shows skeleton placeholder rows while fetching the next page and prevents duplicate overlapping fetches.

Requirements

  • Render 5 initial `.feed-post` items inside `[data-testid="feed-container"]`.
  • Triggering `[data-testid="load-next-btn"]` renders `.skeleton-card` loaders while fetching (`80ms` async mock).
  • Ignore rapid double-clicks while `isLoading` is true so only one batch appends.
Progressive Hints (1)
  • Track `isFetching` boolean flag and toggle `.skeleton-card` block visibility during async await/timeout.
Reference Solution

Stuck? Load the verified reference code into your editor.

Automated Test Suite

1 Test Cases Ready
  • Shows skeletons during load and blocks duplicate requestsRapid double click adds only 5 new posts after async fetch completes
solution.html
Live Sandboxed Previewiframe sandbox
Starter template loaded — add your <script> logic in the editor (or open Reference Solution) to make the widget interactive.