acdlite/react-codemod — explained in plain English
Analysis updated 2026-08-03 · repo last pushed 2017-04-14
Modernize a large React codebase by converting React.createClass components to ES6 class syntax.
Update old React.createElement calls to modern JSX syntax across an entire project in one pass.
Preview code transformations with a dry run before committing changes to your repository.
Reorder component lifecycle methods to match a consistent style guide automatically.
| acdlite/react-codemod | 3imed-jaberi/cryptography-si-isamm | 3imed-jaberi/koa-isomorphic-router | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2017-04-14 | 2021-09-25 | 2021-02-06 |
| Maintenance | Dormant | Dormant | Dormant |
| Setup difficulty | moderate | easy | easy |
| Complexity | 3/5 | 1/5 | 2/5 |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires installing jscodeshift and understanding which transform matches your React version upgrade path.
React-codemod is a toolkit for automatically updating React code when the React API changes. Instead of manually finding and rewriting dozens or hundreds of files every time React introduces a new pattern or deprecates an old one, you run one of these scripts and it rewrites the code for you. The scripts work by parsing your JavaScript files, identifying specific patterns, like calls to React.createElement or older ways of accessing DOM nodes, and replacing them with the modern equivalent, such as JSX syntax or React.findDOMNode. You point a script at a directory, and it walks through your code making the swaps. Some transforms also reorder methods in a component to match a style guide, or convert old class definitions into newer ES6 class syntax. You can do a dry run first to preview the changes before committing to them. The main audience is developers maintaining React applications that were written against older versions of the library and now need to modernize. For example, if you have a large codebase full of React.createClass components and want to move to ES6 classes, the class transform handles the heavy lifting, pulling out statics, converting getInitialState, rewriting method bindings, and so on. It is deliberately conservative: if it sees deprecated API calls or patterns it cannot safely convert, it skips that component rather than guessing and breaking things. The project is community-driven and explicitly not officially maintained. The scripts were originally used inside Facebook or contributed by community members, and fixes rely on pull requests rather than dedicated maintainers. The README also notes that after running the React-to-React-DOM transform, you may still need a separate regex-based find-and-replace to clean up whitespace between import statements.
A collection of scripts that automatically rewrite old React code to use modern patterns, like converting React.createClass to ES6 classes or updating API calls, so you don't have to update hundreds of files by hand.
Mainly JavaScript. The stack also includes JavaScript, React, Babel.
Dormant — no commits in 2+ years (last push 2017-04-14).
No license information is provided in the explanation, so the licensing terms are unknown.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.