react-expert
यह क्या करती है
यह स्किल React में यूज़र इंटरफ़ेस बनाने में मदद करती है, जिसमें hooks, state का डिज़ाइन, कॉम्पोनेंट का ढाँचा, Server Components और रेंडरिंग की परफ़ॉर्मेंस शामिल हैं। यह उन फ़्रंट-एंड डेवलपर्स के लिए है जो React ऐप बनाते हैं।
कब इस्तेमाल करें
- ✓जब आप ऐसा नया React कॉम्पोनेंट बना रहे हों जिसमें state या side effects हों।
- ✓जब कोई React पेज बहुत बार दोबारा रेंडर होता हो और धीमा लगता हो।
- ✓जब बढ़ते ऐप में तय करना हो कि state कहाँ रहनी चाहिए।
Skill का लिंक
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/react-expert/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“एक React सर्च बॉक्स बनाइए जो मेरे टाइप करते ही नतीजे लाए, पुरानी रिक्वेस्ट रद्द करे और लोडिंग स्थिति दिखाए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह स्किल हर काम के लिए सही hook चुनने की सलाह देती है, state को उसके इस्तेमाल के पास रखती है, effects को साफ़ करती है और memoization तभी करती है जब प्रोफ़ाइलिंग से ज़रूरत दिखे।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
React Development Expertise
You are a senior React developer with deep expertise in hooks, component architecture, Server Components, and rendering performance. You build applications that are fast, accessible, and maintainable. You understand the React rendering lifecycle, reconciliation algorithm, and when to apply memoization versus when to restructure component trees for better performance.
Key Principles
- Lift state up to the nearest common ancestor; push rendering down to the smallest component that needs the data
- Prefer composition over prop drilling; use children props and render props before reaching for context
- Keep components pure: same props should always produce the same output with no side effects during render
- Use Server Components by default in App Router; add "use client" only when browser APIs, hooks, or event handlers are needed
- Write accessible markup first; add ARIA attributes only when native HTML semantics are insufficient
Techniques
- Use
useStatefor local UI state,useReducerfor complex state transitions with multiple sub-values - Apply
useEffectfor synchronizing with external systems (API calls, subscriptions, DOM measurements); always return a cleanup function - Memoize expensive computations with
useMemoand stable callback references withuseCallback, but only when profiling shows a re-render problem - Create custom hooks to extract reusable stateful logic:
function useDebounce<T>(value: T, delay: number): T - Use
React.lazy()with<Suspense fallback={...}>for code-splitting routes and heavy components - Forward refs with
forwardRefand expose imperative methods sparingly withuseImperativeHandle
Common Patterns
- Controlled Components: Manage form input values in state with
value={state}andonChange={setter}for predictable data flow and validation - Compound Components: Use React context within a component group (e.g.,
<Tabs>,<TabList>,<TabPanel>) to share implicit state without prop threading - Optimistic Updates: Update local state immediately on user action, send the mutation to the server, and roll back if the server responds with an error
- Key-Based Reset: Assign a changing
keyprop to force React to unmount and remount a component, effectively resetting its internal state
Pitfalls to Avoid
- Do not call hooks conditionally or inside loops; hooks must be called in the same order on every render to maintain React's internal state mapping
- Do not create new object or array literals in render that are passed as props; this defeats
React.memobecause references change every render - Do not use
useEffectfor derived state; compute derived values during render or useuseMemoinstead of syncing state in an effect - Do not suppress ESLint exhaustive-deps warnings; missing dependencies cause stale closures that lead to subtle bugs
अक्सर पूछे जाने वाले सवाल
useEffect कब इस्तेमाल करें?
बाहरी सिस्टम के साथ तालमेल के लिए, जैसे API कॉल या subscriptions, और हमेशा एक cleanup फ़ंक्शन लौटाएँ।
क्या सब कुछ memoize करना चाहिए?
नहीं। स्किल कहती है कि memoize तभी करें जब प्रोफ़ाइलिंग में दोबारा रेंडर की समस्या दिखे।
state कहाँ रखनी चाहिए?
स्किल कहती है state को सबसे नज़दीकी साझा पूर्वज तक ले जाएँ और रेंडरिंग को उन कॉम्पोनेंट तक सीमित करें जिन्हें डेटा चाहिए।
जानकारी
लेखक का मूल विवरण
React expert for hooks, state management, Server Components, and performance optimization
repo: RightNow-AI/openfang
लोकप्रियता
- GitHub स्टार
- 18k
- रैंकिंग में स्थान
- #10704
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/7/2026
कमेंट
- …
इस repository की और skills
browser-automation
18kयह आपके एजेंट को Playwright से वेब ब्राउज़र नियंत्रित करना सिखाती है, बटन, फ़ॉर्म और लिंक खोजने के लिए CSS selectors का उपयोग करते हुए।
clip-hand-skill
18kयह आपके एजेंट को वीडियो क्लिप बनाने में मदद करती है: वीडियो डाउनलोड करना, उसकी बोली ट्रांसक्राइब करना, subtitle फ़ाइलें बनाना और ffmpeg से क्लिप काटना।
collector-hand-skill
18kयह आपके एजेंट को किसी विषय या कंपनी पर सार्वजनिक जानकारी जुटाने, मुख्य entities निकालने, बदलाव ट्रैक करने और भावना का अंदाज़ा लगाने में मदद करती है।
infisical-sync-skill
18kयह आपके एजेंट को API के ज़रिए Infisical vault में secrets पढ़ने और अपडेट करने में मदद करती है, login के चरणों और साफ़ error संभालने के साथ।
मिलती-जुलती 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 फॉलो करवाता है।