Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
[React 19] revive `react-test-renderer` | GoodFirstPicks

[React 19] revive `react-test-renderer`

facebook/react 13 comments 1mo ago
View on GitHub
highopenScope: somewhat clearSkill match: maybeTest focusedReactJavaScriptTypeScript

Why this is a good first issue

Reviving a deprecated package with unclear implementation details and potential architectural implications.

AI Summary

The issue requests reviving `react-test-renderer`, a deprecated package, to provide official test utilities for React. The task involves addressing the deprecation reasons, potentially redesigning the package to avoid exposing internal fiber data structures, and ensuring compatibility with React 19. The main blocker is the unclear implementation path and potential architectural changes required.

Issue Description

Summary

Ideally react is shipped with official test utilities instead of relying on third-party vendors.

Unfortunately it was decided to deprecatereact-test-renderer.

As a consequence it isn't easy anymore to:

  • write unit tests
  • test React components independently of the target platform (React DOM, React Native, or any other custom renderer which is out there)
  • test complex, deeply nested component trees
  • shallow render
  • make shallow snapshots
  • to run tests FAST (in memory)

Regressions

@testing-library/react is an integration testing library, promotes testing anti-patterns and completely ditches unit tests. It is slow and requires a DOM or a mock like js-dom.

Please refer to these resources for a comprehensive understanding of why unit tests are of high value:

  • https://martinfowler.com/articles/practical-test-pyramid.html#UnitTests

Other critical voices from the community

  • https://javascript.plainenglish.io/in-defense-of-shallow-rendering-5f627f7c155d
  • https://blog.hao.dev/my-struggles-with-react-testing-library

References

react-test-renderer is deprecated. A warning will fire whenever calling ReactTestRenderer.create() or ReactShallowRender.render(). The react-test-renderer package will remain available on NPM but will not be maintained and may break with new React features or changes to React’s internals. https://react.dev/warnings/react-test-renderer

react-test-renderer is deprecated and no longer maintained. It will be removed in a future version. As of React 19, you will see a console warning when invoking ReactTestRenderer.create(). https://www.npmjs.com/package/react-test-renderer/v/19.0.0-canary-8afa144bd-20240416?activeTab=readme#react-test-renderer-deprecated

Note: that affects any code using react-test-renderer https://github.com/search?q=repo%3Ajestjs

GitHub Labels

React 19

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 35 points when you complete it!

Risk Flags

  • deprecated package
  • potential architectural changes
  • community disagreement
Loading labels...

Details

Points35 pts
Difficultyhigh
Scopesomewhat clear
Skill Matchmaybe
Test Focusedyes