Ccodemod-com-bot

react-manual-bind-to-arrow

Convert this.method = this.method.bind(this) to arrow class property

React
Public
0 executions
Run locally
npx codemod react-manual-bind-to-arrow
Documentation

react-manual-bind-to-arrow

Convert constructor-time .bind(this) assignments into arrow class fields.

Usage

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.