flow

Pemeriksaan tipe statis untuk kode React di berbagai platform DOM dan native. Empat opsi renderer mencakup DOM standar, kode spesifik browser, React Native, dan lingkungan Fabric. Jalankan yarn flow dengan argumen renderer opsional; gunakan yarn flow-ci untuk pemeriksaan menyeluruh namun lebih lambat. Melaporkan kesalahan tipe beserta lokasi file untuk membantu mengidentifikasi dan memperbaiki masalah dengan cepat. Perhatikan jebakan umum: spesifikasi renderer yang hilang, penekanan $FlowFixMe yang tidak diperiksa, dan impor tipe yang salah.

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

Lebih banyak skill dari 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
Guide a developer through setting up a Meta API integration from scratch — discovers the right APIs, fetches setup guides, authentication requirements,…
official
app-review-prep
facebook
Prepare a Meta app for App Review — checks current status, outstanding requirements, granted privileges, and submission history. Use before submitting an app…
official
debug-webhooks
facebook
Troubleshoot webhook issues for a Meta app — inspect active subscriptions, identify misconfiguration, and send test payloads to verify delivery. Use when…
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
Pandu pengguna melalui penulisan aturan Buck2 pertama mereka untuk mempelajari konsep dasar termasuk rules, actions, targets, configurations, analysis, dan select(). Gunakan…
official
add-ir-instruction
facebook
Guide for adding a new IR instruction to the Hermes compiler. Use when the user asks to add, create, or define a new IR instruction (Inst/Instruction) in the…
official
binary-size-analysis
facebook
This skill should be used when the user wants to analyze hermesvm binary size changes across a range of commits. Use when the user mentions "binary size",…
official