跳转到主要内容

Contributing

This page describes the minimum contribution loop: what to submit, how reviews work, and the long-term maintainability bar.

Technical writing template (v1)

The goal is not to write more text, but to make each page provably useful: readers should be able to predict behavior and avoid common pitfalls.

  • Start with TL;DR: 3–6 bullets that state the core contract and the biggest pitfalls.
  • Define invariants: what React guarantees vs what it does not.
  • Prefer mechanisms over slogans: explain why a pattern works, not just how.
  • Include at least one counterexample: how people usually get it wrong and how to fix it.
  • Close the loop with links: Learn → Guides → Reference → Explanation.

Benchmark deep content rubric

A benchmark page is not “long”; it is a page that makes readers more correct. Use this rubric when proposing or reviewing deep dives.

  • Contract first: TL;DR states guarantees, non-guarantees, and the highest-impact pitfalls.
  • Mechanism + invariants: explain why the model works and which invariants it relies on.
  • Counterexample driven: include at least one common wrong approach and how to fix it.
  • Operational guidance: give boundary placement, checklists, or decision criteria—not just APIs.
  • Link closure: connect Learn → Guides → Reference → Explanation so readers can deepen or verify.
  • Precision over hype: avoid ambiguous claims; if a behavior depends on frameworks/caching/runtime, state prerequisites.
Contributing - Community - React Docs - React 文档