react19-source-patterns
โดย github
เอกสารอ้างอิงสำหรับรูปแบบการย้ายไฟล์ต้นฉบับของ React 19 รวมถึงการเปลี่ยนแปลง API การจัดการ ref และการอัปเดต context
npx skills add https://github.com/github/awesome-copilot --skill react19-source-patternsReact 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.
Skills เพิ่มเติมจาก github
console-rendering
github
คำแนะนำสำหรับการใช้ระบบเรนเดอร์คอนโซลที่ใช้ struct tag ใน Go
official
acquire-codebase-knowledge
github
ใช้ทักษะนี้เมื่อผู้ใช้ขอให้ทำแผนที่ จัดทำเอกสาร หรือเริ่มต้นใช้งานในโค้ดเบสที่มีอยู่จริง โดยจะเริ่มทำงานเมื่อมีข้อความแจ้งเช่น "ทำแผนที่โค้ดเบสนี้" "จัดทำเอกสาร…
official
acreadiness-assess
github
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc…
official
acreadiness-generate-instructions
github
สร้างไฟล์คำแนะนำ AI agent ที่ปรับแต่งตามคำสั่ง AgentRC instructions สร้างไฟล์ .github/copilot-instructions.md (ค่าเริ่มต้น แนะนำสำหรับ Copilot ใน VS…)
official
acreadiness-policy
github
ช่วยผู้ใช้เลือก เขียน หรือใช้ AgentRC policy นโยบายปรับแต่งการให้คะแนนความพร้อมโดยปิดการตรวจสอบที่ไม่เกี่ยวข้อง เปลี่ยนระดับผลกระทบ/ระดับ การตั้งค่า…
official
add-educational-comments
github
เพิ่มความคิดเห็นเชิงการศึกษาให้กับไฟล์โค้ดเพื่อเปลี่ยนให้เป็นแหล่งเรียนรู้ที่มีประสิทธิภาพ ปรับระดับความลึกและน้ำเสียงของคำอธิบายตามระดับความรู้ที่กำหนดได้สามระดับ: ผู้เริ่มต้น ระดับกลาง และระดับสูง ขอไฟล์โดยอัตโนมัติหากไม่มีไฟล์ที่ให้ไว้ พร้อมการจับคู่รายการแบบมีหมายเลขเพื่อการเลือกที่รวดเร็ว ขยายไฟล์ได้สูงสุด 125% โดยใช้เฉพาะความคิดเห็นเชิงการศึกษา (ขีดจำกัดสูงสุด: 400 บรรทัดใหม่; 300 บรรทัดสำหรับไฟล์ที่มีมากกว่า 1,000 บรรทัด) รักษาการเข้ารหัสไฟล์ รูปแบบการเยื้อง ความถูกต้องของไวยากรณ์ และ...
official
adobe-illustrator-scripting
github
เขียน ดีบัก และปรับสคริปต์อัตโนมัติของ Adobe Illustrator ให้เหมาะสมโดยใช้ ExtendScript (JavaScript/JSX) ใช้เมื่อสร้างหรือแก้ไขสคริปต์ที่จัดการ...
official
agent-governance
github
นโยบายเชิงประกาศ การจำแนกเจตนา และเส้นทางการตรวจสอบสำหรับควบคุมการเข้าถึงเครื่องมือและพฤติกรรมของเอเจนต์ AI นโยบายการกำกับดูแลที่ประกอบได้กำหนดเครื่องมือที่อนุญาต/บล็อก ตัวกรองเนื้อหา การจำกัดอัตรา และข้อกำหนดการอนุมัติ — จัดเก็บเป็นคอนฟิกูเรชัน ไม่ใช่โค้ด การจำแนกเจตนาเชิงความหมายตรวจจับพรอมต์อันตราย (การขโมยข้อมูล การยกระดับสิทธิ์ การฉีดพรอมต์) ก่อนการดำเนินการเครื่องมือโดยใช้สัญญาณตามรูปแบบ ตัวตกแต่งการกำกับดูแลระดับเครื่องมือบังคับใช้นโยบายที่ฟังก์ชัน...
official