Skip to content

Commit

Permalink
docs: multi-line code snippet for layout on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo committed Mar 5, 2022
1 parent 49f2923 commit bc7263d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/src/pages/guides/migrating-to-react-query-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ You can easily apply it by using one (or both) of the following commands:

If you want to run it against `.js` or `.jsx` files, please use the command below:

`npx jscodeshift --extensions=js,jsx --transform=./node_modules/react-query/codemods/v4/key-transformation.js ./path/to/src/`
```
npx jscodeshift --extensions=js,jsx --transform=./node_modules/react-query/codemods/v4/key-transformation.js ./path/to/src/
```

If you want to run it against `.ts` or `.tsx` files, please use the command below:

`npx jscodeshift --extensions=ts,tsx --parser=tsx --transform=./node_modules/react-query/codemods/v4/key-transformation.js ./path/to/src/`
```
npx jscodeshift --extensions=ts,tsx --parser=tsx --transform=./node_modules/react-query/codemods/v4/key-transformation.js ./path/to/src/
```

Please note in the case of `TypeScript` you need to use `tsx` as the parser otherwise, the codemod won't be applied properly!

Expand Down

0 comments on commit bc7263d

Please sign in to comment.