react19-source-patterns
यह क्या करती है
यह गाइड React 19 के लिए आपके कोड को अपडेट करने में मदद करती है। यह दिखाती है कि कोड के वे खास हिस्से कैसे बदलें जो नए वर्शन में काम करना बंद कर गए या जिनकी जगह बदल गई।
कब इस्तेमाल करें
- ✓जब आप अपने React प्रोजेक्ट को React 19 में अपडेट कर रहे हों।
- ✓जब अपडेट के बाद React कोड का कोई हिस्सा काम करना बंद कर दे।
- ✓किसी खास फ़ाइल में ज़रूरी बदलाव समझने के लिए।
Skill का लिंक
https://github.com/github/awesome-copilot/blob/main/skills/react19-source-patterns/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“React 19 के लिए ReactDOM.render को कैसे अपडेट करूं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI आपके पुराने कोड की तुलना React 19 के माइग्रेशन पैटर्न से करता है। यह हर कोड हिस्से के लिए ज़रूरी सटीक बदलाव सुझाता है, जैसे `ReactDOM.render` की जगह `createRoot().render()` लिखना।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
React 19 Source Migration Patterns
Reference for every source-file migration required for React 19.
Quick Reference Table
| Pattern | Action | Reference |
|---|---|---|
ReactDOM.render(...) |
→ createRoot().render() |
See references/api-migrations.md |
ReactDOM.hydrate(...) |
→ hydrateRoot(...) |
See references/api-migrations.md |
unmountComponentAtNode |
→ root.unmount() |
Inline fix |
ReactDOM.findDOMNode |
→ direct ref | Inline fix |
forwardRef(...) wrapper |
→ ref as direct prop | See references/api-migrations.md |
Component.defaultProps = {} |
→ ES6 default params | See references/api-migrations.md |
useRef() no arg |
→ useRef(null) |
Inline fix add null |
| Legacy Context | → createContext |
→ api-migrations.md#legacy-context |
String refs this.refs.x |
→ createRef() |
→ api-migrations.md#string-refs |
import React from 'react' (unused) |
Remove | Only if no React. usage in file |
PropTypes Rule
Do not remove .propTypes assignments. The prop-types package still works as a standalone validator. React 19 only removes the built-in runtime checking from the React package the package itself remains valid.
Add this comment above any .propTypes block:
// NOTE: React 19 no longer runs propTypes validation at runtime.
// PropTypes kept for documentation and IDE tooling only.
Read the Reference
For full before/after code for each migration, read references/api-migrations.md. It contains the complete patterns including edge cases for forwardRef with useImperativeHandle, defaultProps null vs undefined behavior, and legacy context provider/consumer cross-file migrations.
अक्सर पूछे जाने वाले सवाल
क्या मुझे `.propTypes` हटाने होंगे?
नहीं, `.propTypes` हटाने की ज़रूरत नहीं है। ये अब भी validators की तरह काम करते हैं, बस React 19 इन्हें अपने-आप नहीं चलाता। डॉक्यूमेंटेशन और टूल्स के लिए इन्हें रखना अच्छा है।
'String refs' क्या हैं?
ये React में एलिमेंट्स को रेफ़र करने का पुराना तरीका है, जैसे `this.refs.myElement`। React 19 इसकी जगह `createRef()` इस्तेमाल करने का सुझाव देता है।
बिना argument वाले `useRef()` का क्या?
अगर आप `useRef()` को बिना शुरुआती वैल्यू के इस्तेमाल करते हैं, तो React 19 आर्गुमेंट में `null` जोड़ने को कहता है, यानी `useRef(null)`।
जानकारी
लेखक का मूल विवरण
Reference for React 19 source-file migration patterns, including API changes, ref handling, and context updates.
repo: github/awesome-copilot
लोकप्रियता
- GitHub स्टार
- 40k
- रैंकिंग में स्थान
- #7390
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
acquire-codebase-knowledge
40kआपके एजेंट को किसी मौजूदा code प्रोजेक्ट को समझने और उसका documentation बनाने में मदद करता है। यह नए लोगों को प्रोजेक्ट से जोड़ने या architecture का सार जानने में उपयोगी है।
acreadiness-assess
40kआपके एजेंट को किसी प्रोजेक्ट की AI के लिए तैयारी जाँचने और रिपोर्ट बनाने देता है। यह समझने में उपयोगी है कि प्रोजेक्ट AI tools इस्तेमाल करने के लिए कितना तैयार है।
acreadiness-generate-instructions
40kआपके एजेंट को assessment के आधार पर AI tools के लिए निर्देश बनाने में मदद करता है। यह बताता है कि AI कोड के साथ बेहतर कैसे काम करे और पहचानी गई कमियाँ कैसे दूर हों।
acreadiness-policy
40kआपके एजेंट को AI प्रोजेक्ट assessment के लिए नीतियाँ तय करने या लागू करने में मदद करता है। यह प्रोजेक्ट्स के मूल्यांकन को मानक बनाने और compliance सुनिश्चित करने में उपयोगी है।
मिलती-जुलती 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 फॉलो करवाता है।