Ccodemod-com-bot

react-new/rename-unsafe-lifecycles

Rename deprecated lifecycle methods to UNSAFE_ prefixed versions

React
Private
0 executions
Run locally
npx codemod @react-new/rename-unsafe-lifecycles
Documentation

rename-unsafe-lifecycles

Rename deprecated React lifecycle names to their UNSAFE_ equivalents in class components, object literals, and member references.

Usage

bash

Development

bash
Before

This is one example from the codemod's test cases. The codemod may handle many more cases.

Ready to contribute?

Build your own codemod and share it with the community.