flow

โดย facebook

การตรวจสอบชนิดข้อมูลแบบคงที่สำหรับโค้ด React ทั้งบน DOM และแพลตฟอร์มเนทีฟ มีตัวเลือกเรนเดอร์สี่แบบครอบคลุม DOM มาตรฐาน โค้ดเฉพาะเบราว์เซอร์ React Native และสภาพแวดล้อม Fabric รัน yarn flow พร้อมอาร์กิวเมนต์เรนเดอร์เสริม ใช้ yarn flow-ci สำหรับการตรวจสอบที่ครอบคลุมแต่ช้ากว่า รายงานข้อผิดพลาดชนิดข้อมูลพร้อมตำแหน่งไฟล์เพื่อช่วยระบุและแก้ไขปัญหาได้อย่างรวดเร็ว ระวังข้อผิดพลาดทั่วไป: การไม่ระบุเรนเดอร์ การละเลยการตรวจสอบ $FlowFixMe และการนำเข้าชนิดข้อมูลที่ไม่ถูกต้อง

npx skills add https://github.com/facebook/react --skill flow

Flow Type Checking

Arguments:

  • $ARGUMENTS: Renderer to check (default: dom-node)

Renderers

RendererWhen to Use
dom-nodeDefault, recommended for most changes
dom-browserBrowser-specific DOM code
nativeReact Native
fabricReact Native Fabric

Instructions

  1. Run yarn flow $ARGUMENTS (use dom-node if no argument)
  2. Report type errors with file locations
  3. For comprehensive checking (slow), use yarn flow-ci

Common Mistakes

  • Running without a renderer - Always specify or use default dom-node
  • Ignoring suppressions - Check if $FlowFixMe comments are masking real issues
  • Missing type imports - Ensure types are imported from the correct package

Skills เพิ่มเติมจาก facebook

api-health
facebook
Monitor API health for a Meta app — check rate limits, call volume, and API deprecations. Use to diagnose throttling, plan capacity, or prepare for API version…
official
api-integration
facebook
แนะนำนักพัฒนาในการตั้งค่าการเชื่อมต่อ Meta API ตั้งแต่เริ่มต้น — ค้นหา API ที่เหมาะสม ดึงคู่มือการตั้งค่า ข้อกำหนดการยืนยันตัวตน…
official
app-review-prep
facebook
เตรียมแอป Meta สำหรับ App Review — ตรวจสอบสถานะปัจจุบัน ข้อกำหนดที่ค้างอยู่ สิทธิ์ที่ได้รับ และประวัติการส่ง ใช้ก่อนส่งแอป…
official
debug-webhooks
facebook
แก้ไขปัญหาเว็บฮุคสำหรับแอป Meta — ตรวจสอบการสมัครใช้งานที่ใช้งานอยู่ ระบุการตั้งค่าที่ผิดพลาด และส่งเพย์โหลดทดสอบเพื่อยืนยันการส่งมอบ ใช้เมื่อ…
official
webhook-setup
facebook
Set up webhooks for a Meta app end-to-end — discover available topics, subscribe to fields, and verify with a test payload. Use when configuring webhooks for…
official
buck2-rule-basics
facebook
แนะนำผู้ใช้ผ่านการเขียนกฎ Buck2 ตัวแรก เพื่อเรียนรู้แนวคิดพื้นฐาน ได้แก่ กฎ แอ็กชัน เป้าหมาย คอนฟิกูเรชัน การวิเคราะห์ และ select() ใช้…
official
add-ir-instruction
facebook
คู่มือสำหรับการเพิ่ม IR instruction ใหม่ให้กับ Hermes compiler ใช้เมื่อผู้ใช้ขอให้เพิ่ม สร้าง หรือกำหนด IR instruction ใหม่ (Inst/Instruction) ใน...
official
binary-size-analysis
facebook
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการวิเคราะห์การเปลี่ยนแปลงขนาดไบนารีของ hermesvm ในช่วงของคอมมิต ใช้เมื่อผู้ใช้กล่าวถึง "binary size",…
official