reactjs / reactjs/react.dev

What is the status of "shallow renderer"?

Open
#5,396 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

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

image

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 :-) )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked shallow-renderer documentation page and the react-test-renderer/shallow.js entry point, then compare them with the linked test-renderer documentation. Determine the feature's React 18 status and whether the separate react-shallow-renderer package is current. Done means the documentation clearly states its status and appears appropriately in navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.