What is the status of "shallow renderer"?
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 11.8k
- 分支
- 7.9k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 11
描述
Google leads me to this page: https://reactjs.org/docs/shallow-renderer.html
However, I can not find it anywhere in the table of contents on the right.
Note that the versioning on the page suggests that this is a feature of React 18

I see that react-test-renderer does export react-test-renderer/shallow ( https://github.com/facebook/react/blob/main/packages/react-test-renderer/shallow.js ), but it isn't documented (https://reactjs.org/docs/test-renderer.html). I also see that shallow-renderer ( https://www.npmjs.com/package/react-shallow-renderer ) is versioned 16, and was last updated 2 years ago, suggesting to me that it is not up to date with React 18.
It would be nice if some clarification of the state of this feature was added to the page. (I'd be happy to volunteer to make such a PR, but I have no way of knowing what the definitive answer is :-) )
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先從連結的 shallow renderer 文件頁面和 react-test-renderer/shallow.js 入口點開始,然後將它們與連結的 test renderer 文件進行比較。確定此功能在 React 18 中的狀態,以及獨立的 react-shallow-renderer 套件是否為目前版本。文件清楚說明其狀態並在導覽中適當顯示,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100