We want this community to be friendly and respectful to each other. Please read the full text so that you can understand what actions will and will not be tolerated.
The core team works directly on GitHub and all work is public.
Working on your first pull request? You can learn how from this free series: How to Contribute to an Open Source Project on GitHub.
- Fork the repo and create your branch from
main(a guide on how to fork a repository). - Run
yarnto setup the development environment. - Make your changes, add tests, and try them out in the example app.
- Run
yarn validateto type check, test, lint, and check formatting. CI runs the same checks on your pull request. - Open a pull request following the pull request guidelines.
Detailed guides live in contributing/. They are written for both human contributors and AI coding agents:
- Architecture and API design: project goals, API design principles, and host component detection
- Build, validation, and repo layout: commands, package docs generation, folder structure
- TypeScript and code style: lint and formatting rules
- Testing conventions: how the library's own tests are organized
- Native event propagation: which React Native events bubble and which are direct
- Native state: how RNTL simulates state that lives in native views, like
TextInputtext and scroll position - Event dispatch: how
fireEventanduserEventfind handlers and which events they send - Accessibility model: hidden elements, roles, accessible names, and state used by queries and matchers
- Async,
act, and timers:actenvironment, fake timer detection,waitFor,userEventdelays, and cleanup - Example app regeneration: upgrading the Expo apps in
examples/ - Git, releases, and PR workflow: commit message convention, pull requests, releases
You can report issues on our bug tracker. Please follow the issue template when opening an issue.
By contributing to @testing-library/react-native, you agree that your contributions will be licensed under its MIT license.