packages/react-devtools/CONTRIBUTING.md MARKDOWN 81 lines View on github.com → Search inside
12Interested in contributing to React DevTools, but not sure where to start? This is the place!34# Install project dependencies5To get started, check out the React repo:6```sh7git clone git@github.com:facebook/react.git8```9Next install dependencies:10```sh11cd <react-repo>12yarn install13```1415# Build React and React DOM16Next, check out (or build) the local version of React that DevTools uses:1718### Option 1 (fastest): Checkout pre-built React19To check out the latest version of React (built by CI from the `main` branch) run:20```sh21cd <react-repo>2223cd scripts/release24yarn install2526./download-experimental-build.js --commit=main27```2829### Option 2: Build from source30If your DevTools change includes local changes to React (or if CI is down for some reason) you can also build from source:31```sh32cd <react-repo>33yarn build-for-devtools34```3536# Testing your changes3738### Option 1 (fastest): Using the test shell39Most changes can be tested using the DevTools test app. To run this, you'll need two terminals:4041First, run DevTools in DEV mode:42```sh43cd <react-repo>44cd packages/react-devtools-inline45yarn start46```47Next, run the test shell:48```sh49cd <react-repo>50cd packages/react-devtools-shell51yarn start52```53Now any changes you make to DevTools will automatically reload in the test app at http://localhost:80805455### Option 2: Using the extension56Some changes requiring testing in the browser extension (e.g. like "named hooks"). To do this, run the following script:57```sh58cd <react-repo>59cd packages/react-devtools-extensions60yarn build:chrome:local && yarn test:chrome61```62This will launch a standalone version of Chrome with the locally built React DevTools pre-installed. If you are testing a specific URL, you can make your testing even faster by passing the `--url` argument to the test script:63```sh64yarn build:chrome && yarn test:chrome --url=<url-to-test>65```6667# Unit tests68Core DevTools functionality is typically unit tested (see [here](https://github.com/facebook/react/tree/main/packages/react-devtools-shared/src/__tests__)). To run tests, you'll first need to build or download React and React DOM ([as explained above](#build-react-and-react-dom)) and then use the following NPM script:69```sh70yarn test-build-devtools71```72You can connect tests to a debugger as well if you'd like by running:73```sh74yarn debug-test-build-devtools75```7677# Finding the right first issue78The React team maintains [this list of "good first issues"](https://github.com/facebook/react/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Component%3A+Developer+Tools%22+label%3A%22good+first+issue%22) for anyone interested in contributing to DevTools. If you see one that interests you, leave a comment!7980If you have ideas or suggestions of your own, you can also put together a PR demonstrating them. We suggest filing an issue before making any substantial changes though, to ensure that the idea is something the team feels comfortable landing.

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.