Skip to content

Commit 6f59bbd

Browse files
bennettdamsTkDodo
andauthored
docs: Add un-/install statement to v3 to v4 migration guide (#4186)
* docs(migrating-to-react-query-4): Add un-/install statement This adds a statement to uninstall `react-query` and install `@tanstack/react-query` to the `v3` to `v4` migration guide. * docs(migrating-to-react-query-4): Add devtools install statement Co-authored-by: Dominik Dorfmeister <[email protected]> Co-authored-by: Dominik Dorfmeister <[email protected]>
1 parent 900d2c5 commit 6f59bbd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/guides/migrating-to-react-query-4.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ v4 is a major version, so there are some breaking changes to be aware of:
99

1010
### react-query is now @tanstack/react-query
1111

12+
You will need to un-/install dependencies and change the imports:
13+
14+
```
15+
npm uninstall react-query
16+
npm install @tanstack/react-query
17+
npm install @tanstack/react-query-devtools
18+
```
19+
1220
```diff
1321
- import { useQuery } from 'react-query'
1422
- import { ReactQueryDevtools } from 'react-query/devtools'
@@ -19,7 +27,7 @@ v4 is a major version, so there are some breaking changes to be aware of:
1927

2028
#### Codemod
2129

22-
To make this migration easier, v4 comes with a codemod.
30+
To make the import migration easier, v4 comes with a codemod.
2331

2432
> The codemod is a best efforts attempt to help you migrate the breaking change. Please review the generated code thoroughly! Also, there are edge cases that cannot be found by the code mod, so please keep an eye on the log output.
2533

0 commit comments

Comments
 (0)