morph-cli 0.1.0

AST-based codebase migration and codemod tool for JavaScript and TypeScript projects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# React Class to Hooks Migration Example

This example shows how morph-cli can modernize React class components into functional components using Hooks.

## Instructions

1.  Navigate to this directory.
2.  Run the migration command:
    ```bash
    morph run react-class-to-hooks .
    ```
3.  To apply the changes, run:
    ```bash
    morph run react-class-to-hooks . --write
    ```
4.  Check `App.jsx` to see the class component converted to a functional component using `useState` and `useEffect`.