lazy-loading

Defer data loading until user interaction, visibility, or navigation requires it.

13|2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/yanko-belov/code-craft --skill lazy-loading
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lazy-loading
Source: https://github.com/yanko-belov/code-craft/tree/main/skills/lazy-loading
Command: npx skills add https://github.com/yanko-belov/code-craft --skill lazy-loading

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defers data loading until it's actually required to improve perceived performance.

Core Features & Use Cases

  • Load critical data first and defer non-critical data until user action or visibility.
  • Trigger loads on interaction, scroll, or route changes to minimize initial latency.
  • Handle paginated or infinitely scrolling lists by loading items on demand as needed.

Quick Start

  • Implement lazy-loading on a dashboard to defer non-critical data until needed.

Frequently Asked Questions about lazy-loading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I defer data fetching until a component is visible to improve web performance?

Deferring data fetching until component visibility improves web performance by triggering on-demand loads via interaction hooks or scroll detection. This avoids prefetching unneeded data, minimizing initial latency for dashboards and lists until user action requires it.

What is the best way to handle data loading for infinitely scrolling lists?

Handling data loading for infinitely scrolling lists is best achieved by loading items on demand as needed. Using scroll detection or visibility triggers ensures data is fetched only when required, reducing initial page load times and avoiding prefetching unnecessary list items.

Can I use lazy-loading to speed up dashboard page loads by delaying non-critical data?

You can use lazy-loading to speed up dashboard page loads by loading critical data first and deferring non-critical data. This on-demand fetching pattern triggers loads upon user interaction or route changes, minimizing initial latency and avoiding unneeded data prefetching.

Does lazy-loading work with React to fetch data on demand during route changes?

Lazy-loading works with React to fetch data on demand during route changes by implementing on-demand loading patterns. It defers data fetching until navigation occurs, avoiding prefetching unneeded data and improving perceived performance for frontend web applications.

When should I not use on-demand data fetching for frontend components?

You should not use on-demand data fetching when data is needed immediately upon page load or if prefetching is required for seamless user experience. This approach defers loading to improve perceived performance, so critical data availability might be delayed until user action or visibility triggers occur.