reactjs / reactjs/react.dev

Capitalize React concepts in docs

未關閉
#6,713 29 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

good first issue type: documentation
主要語言
JavaScript
星號
11.8k
分支
7.9k
平均合併
1 天 11 小時
30 天內合併 PR
11

描述

Summary

We should be capitalizing proper React concepts in the docs. This was flagged by @samselikoff here and I took a first pass at correct Effects, Hooks, and Transitions in https://github.com/reactjs/react.dev/pull/6712.

Remaining items

The remaining items are:

Submitting a PR

  • Please do not ask to take an item, just submit a PR. If multiple people submit the same PR, I'll add co-author credit to the commit.

  • Only submit one PR per concept

  • When you submit a PR, please try and cover all usages in all the docs, on all pages excluding the blog and community pages.

  • Avoid fixing one or two instances and favor full coverage to minimize the number of PRs and reviews.

Note that headings like {/* usestate */} must stay lower case, so a find and replace won't work.

Style Guide

  • Capitalize React-specific concepts: Capitalize the names of React concepts and features when referring to them specifically.
  • Lowercase all others: Use lowercase when these words are used in a general context or referring to their general computing or programming meaning.
Guidelines for Specific Terms

Components

  • Capitalize when referring to React Components
    • ❌ Incorrect: "functional components are a core concept in React."
    • ✅ Correct: "Functional Components are a core concept in React."
  • Use lowercase when discussing components in a general programming or descriptive sense
    • ❌ Incorrect: "Components should manage their own State."
    • ✅ Correct: "components should manage their own state."

State

  • Capitalize when discussing React State in the context of the React system
    • ❌ Incorrect: "Create dynamic and interactive Components with state."
    • ✅ Correct: "Create dynamic and interactive Components with State."
  • Use lowercase for the general concept of state
    • ❌ Incorrect: "When a component's State changes, it re-renders."
    • ✅ Correct: "When a component's state changes, it re-renders."

Effects

  • Capitalize when referring to Effects used via hooks like useEffect
    • ❌ Incorrect: "Use effects to perform side effects in function components."
    • ✅ Correct: "Use Effects to perform side effects in function components."
  • Use lowercase for general references to effects or side effects in programming
    • ❌ Incorrect: "Effects let you perform side Effects in function components."
    • ✅ Correct: "Effects let you perform side effects in Function Components."

Transitions

  • Capitalize when discussing the specific Transition feature ("use Transitions to defer updates").
    • ❌ Incorrect: "use transitions to defer updates"
    • ✅ Correct: "use Transitions to defer updates"
  • Use lowercase when referring to the general concept of transitions in UI/UX ("transition animations").
    • ❌ Incorrect: You can also add a CSS Transition to delay dimming
    • ✅ Correct: You can also add a CSS transition to delay dimming

Context

  • Capitalize when discussing the specific Context feature ("use Context to share data").
    • ❌ Incorrect: "use context to share data between components"
    • ✅ Correct: "use Context to share data between Components"
  • Use lowercase when the word "context" refers to the general concept of context (understand the context)
    • ❌ Incorrect: "understand the Context it's running in"
    • ✅ Correct: "understand the context it's running in"

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先從 issue 的 style guide 開始,然後搜尋所有文件頁面,找出一個剩餘的概念,例如 Actions 或 Suspense,但排除部落格和社群頁面。請結合上下文檢查每個用法,因為一般程式設計術語和 {/* usestate */} 這樣的標題維持小寫。完成表示一個 PR 涵蓋該概念的所有用法,並使用指定的大小寫。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, react
領域
content, documentation
Issue 類型
文件
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。