# reactjs/react-codemod

React codemod scripts

Repository: https://github.com/reactjs/react-codemod
Canonical: https://ross.abutalabs.com/products/react-codemod
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-02-22T23:10:31+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 68, release rhythm 35, longevity 100
- inputs: {"age_days": 3971, "days_push": 192, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4411, forks 298 (observed 2026-08-28T04:08:48.513360+00:00)

## What it is
A collection of codemod scripts for automatically updating React applications across versions, runnable via the codemod CLI or npx. It transforms source code (e.g., replacing ReactDOM.render with createRoot, removing forwardRef, converting createElement to JSX) using AST-based rewrites.

## Use cases
- upgrade a React app to React 19
- automatically replace deprecated ReactDOM.render with createRoot
- convert React.createElement calls to JSX
- migrate string refs to callback refs
- bulk-refactor forwardRef usage across a codebase
- update act imports for new React test APIs

## When to choose
- you are upgrading a React codebase across major versions and want automated migrations
- you need to apply repetitive mechanical refactors to many React files safely

## When to avoid
- you need one-off manual refactors on a handful of files
- your project does not use React
- you need transforms for frameworks other than React

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, parser, cli
- domain: developer-tools, frontend, web-development
- platform: cli, cross-platform
- tags: codemod, react, code-migration, jscodeshift, ast-transformation, upgrade-tooling, automation, nodejs

## Member repositories
- reactjs/react-codemod (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:48.513360+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:03.459740+00:00, confidence not recorded.
  - readme: https://github.com/reactjs/react-codemod (fetched 2026-08-28T04:08:48.513360+00:00, sha 5dc7ba403dd8)
  - registry_npm: https://registry.npmjs.org/react-codemod (fetched 2026-08-29T09:09:04.472206+00:00, sha 574bd13c1dc8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
