Skip to content

Commit 14a8f94

Browse files
committed
update readme
1 parent bf26e6d commit 14a8f94

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,78 @@ APIs.
1212

1313
This will start an interactive wizard, and then run the specified transform.
1414
#### Running with `codemod` CLI
15-
`npx codemod <transform> --target <path> [...options]`
15+
`npx codemod <framework>/<version>/<transform> --target <path> [...options]`
1616
* `transform` - name of transform, see available transforms below.
1717
* `path` - directory to transform
1818

19-
Check [codemod docs](https://docs.codemod.com/deploying-codemods/cli]) for the full list of available commands.
19+
Check [codemod docs](https://go.codemod.com/cli-docs]) for the full list of available commands.
2020

2121
### Included Transforms
2222

2323
#### `remove-context-provider`
2424

2525
Converts `Context.Provider` JSX opening and closing elements into `Context`.
2626

27+
Run with `react-codemod` CLI for basic experience:
28+
2729
```sh
2830
npx react-codemod remove-context-provider <path>
2931
```
3032

33+
or use `codemod` CLI for better experience and support:
34+
35+
```sh
36+
npx codemod react/19/remove-context-provider --target <path>
37+
```
38+
3139
#### `remove-forward-ref`
3240

3341
Removes usages of `forwardRef`.
3442

43+
Run with `react-codemod` CLI for basic experience:
44+
3545
```sh
3646
npx react-codemod remove-forward-ref <path>
3747
```
3848

49+
or use `codemod` CLI for better experience and support:
50+
51+
```sh
52+
npx codemod react/19/remove-forward-ref --target <path>
53+
```
54+
3955
#### `remove-memoization-hooks`
4056

4157
Removes usages of `useCallback`, `useMemo` and `memo`.
4258

59+
Run with `react-codemod` CLI for basic experience:
60+
4361
```sh
4462
npx react-codemod remove-memoization-hooks <path>
4563
```
4664

65+
or use `codemod` CLI for better experience and support:
66+
67+
```sh
68+
npx codemod react/19/remove-memoization-hooks --target <path>
69+
```
70+
4771
#### `use-context-hook`
4872

4973
Replaces usages of `React.useContext(...)` with `React.use(...)`.
5074

75+
Run with `react-codemod` CLI for basic experience:
76+
5177
```sh
5278
npx react-codemod use-context-hook <path>
5379
```
5480

81+
or use `codemod` CLI for better experience and support:
82+
83+
```sh
84+
npx codemod react/19/use-context-hook --target <path>
85+
```
86+
5587
#### `create-element-to-jsx`
5688

5789
Converts calls to `React.createElement` into JSX elements.

0 commit comments

Comments
 (0)