import-on-interaction
यह क्या करती है
यह स्किल पेज के कोड में भारी फ़ीचर्स की समीक्षा करती है जो किसी के इस्तेमाल से पहले लोड हो जाते हैं। यह तेज़ पहला लोड चाहने वाले डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब चैट widget या नक्शा हर विज़िट पर लोड हो, पर उसे कम लोग इस्तेमाल करें।
- ✓जब पहले लोड में कोई editor या export टूल शामिल हो जिसे किसी ने नहीं खोला।
- ✓जब आपका शुरुआती कोड bundle पहले दृश्य की ज़रूरत से कहीं बड़ा हो।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/import-on-interaction/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरा चैट widget तभी लोड कर सकते हैं जब विज़िटर उसे खोलने के लिए क्लिक करे?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट ऐसे फ़ीचर खोजता है जिनकी ज़रूरत सिर्फ़ क्लिक, फ़ोकस या hover के बाद होती है, और उन्हें dynamic import से लोड करने का सुझाव देता है। कोड लोड होते समय वह तुरंत फ़ीडबैक दिखाने का भी सुझाव देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Load non-critical code on user interaction
Users should not pay the download, parse, and execution cost for features they may never use. Import-on-interaction shrinks initial JavaScript, reduces main-thread work during page load, and keeps the first view focused on content that matters immediately.
Quick Reference
- Move non-essential code behind clicks, focus, hovers, or explicit user actions
- Use dynamic import() so the code is absent from the initial route bundle
- Show immediate UI feedback while the deferred chunk loads
- Use this for chat widgets, editors, maps, filters, and export flows that are not needed on first paint
Check
Inspect this route or component for heavy modules, widgets, or third-party scripts that load on first render but are only needed after a user clicks, focuses, hovers, or opens a panel.
Fix
Move the non-critical dependency behind a user-triggered dynamic import(), add immediate loading feedback, and ensure the initial render still works without the deferred feature.
Explain
Explain import-on-interaction, why it improves initial performance, and which features are safe to defer until the user shows intent.
Code Review
Inspect event handlers, modal triggers, drawers, editors, maps, export actions, and third-party widgets. Flag code that is included in the initial bundle even though it is only needed after a user interaction, and verify the fix keeps the initial path lighter without degrading the triggered flow.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/import-on-interaction
अक्सर पूछे जाने वाले सवाल
dynamic import क्या है?
यह कोड का एक हिस्सा तभी लोड करता है जब उसकी ज़रूरत हो, पहले पेज लोड के साथ नहीं।
कौन-से फ़ीचर टालना सुरक्षित है?
स्किल चैट widget, editors, नक्शे, फ़िल्टर और export प्रवाह का ज़िक्र करती है, जिनकी पहले दृश्य पर ज़रूरत नहीं होती।
क्या फ़ीचर के बिना भी पेज काम करेगा?
स्किल कहती है कि शुरुआती render को टाले गए फ़ीचर के बिना भी काम करना चाहिए।
जानकारी
लेखक का मूल विवरण
Use when reviewing slow initial loads caused by optional features. Prioritize code that is expensive to download or execute and not required for the first viewport, first input, or core task completion.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2888
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।