Lazy Loading
التحميل الكسول
GLS-000089
Definition
Loading a component or resource only when it's actually needed, not on initial page load.
تحميل مكوّن أو مورد فقط عند الحاجة الفعلية إليه، وليس عند التحميل الأولي للصفحة.
Why It Matters
Smaller initial bundles mean faster page loads. On 404Fault, heavy components like the Knowledge Graph visualization are lazy-loaded.
الحزم الأولية الأصغر تعني تحميل أسرع للصفحة. في 404Fault، المكونات الثقيلة مثل مرئي الرسم البياني للمعرفة تُحمَّل بشكل كسول.
Full Definition
Example Usage
“const KnowledgeGraph = dynamic(() => import('@/components/glossary/KnowledgeGraph'), { ssr: false }) defers loading the graph component.”
“const KnowledgeGraph = dynamic(() => import('@/components/glossary/KnowledgeGraph'), { ssr: false }) يُؤجِّل تحميل مكوّن الرسم البياني.”
AI Builder Tips
Avoid these mistakes when using Lazy Loading:
Lazy loading tiny components (overhead not worth it)
Forgetting ssr: false for components that use browser APIs
Sign in to unlock guided AI explanations from AI Teacher.
Generate a Prompt
Copy this prompt and use it directly with any AI model — no setup needed.
Help me build a project using Lazy Loading. Explain: 1. What is Lazy Loading and why it matters 2. The core architecture and required tools 3. Step-by-step implementation plan 4. Common mistakes to avoid: Lazy loading tiny components (overhead not worth it), Forgetting ssr: false for components that use browser APIs 5. Best practices and production tips