github callstack/react-native-testing-library v14.0.0-beta.0

pre-release12 hours ago

14.0.0-beta.0 (2026-01-20)

Note

This is a beta release. APIs and behavior may change.

What's new

React 19 and React Native 0.78+

  • Drops support for React 18.
  • Requires React 19.0.0+ and React Native 0.78+.

Async APIs

The main APIs are now async to support React 19's async rendering (Suspense, use()):

  • render, renderHook, fireEvent, and act return Promises and must be awaited.
  • This flushes pending React updates before your assertions run.

New renderer

  • Replaced deprecated react-test-renderer with Test Renderer.
  • Improved DX (HostElement replaces ReactTestInstance).

container API

  • screen.container is now safe to use.
  • Returns a pseudo-element container wrapping the rendered elements.

Breaking changes

  • Removed APIs: update (use rerender), getQueriesForElement (use within), UNSAFE_root (use container), and concurrentRoot option.
  • Removed legacy queries: UNSAFE_getAllByType, UNSAFE_getByType, UNSAFE_getAllByProps, and UNSAFE_getByProps. Use standard queries like getByRole.
  • Strict text validation: Text strings must be rendered within a <Text> component. The unstable_validateStringsRenderedWithinText option has been removed; validation is always on.

Migration

Use the codemods to upgrade:

  1. Update dependencies:

    npx codemod@latest rntl-v14-update-deps --target .
    npm install
  2. Migrate to async:

    npx codemod@latest rntl-v14-async-functions --target ./src

See the v14 Migration Guide for details.

Full Changelog

Don't miss a new react-native-testing-library release

NewReleases is sending notifications on new releases.