Improve contextType docs
未關閉
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 11.8k
- 分支
- 7.9k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 11
描述
See confusion in https://github.com/facebook/react/issues/13969.
Specific action items:
- Clarify
.contextTypeis available only since 16.6 (and corresponding RN/Expo release) - Clarify you may not be seeing it due to circular deps, and best practice is to declare it in a separate file
- People sometimes get confused thinking that
createContextvalue is the one you need to "update", we need to explain it's driven by state - Need more coherent doc structure
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先閱讀現有的 contextType 文件,以及 issue 13969 中描述的困惑。釐清 React 16.6 的可用性、循環相依性的相關指引,以及由狀態驅動的 createContext 用法,然後將內容重新整理成更連貫的結構;文件應涵蓋列出的每一項困惑。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100