Open History to see the last commit
1### Intro
2β
3The prerequisite for this code mod is to migrate your usages to the new syntax, so overloads for hooks and `QueryClient` methods shouldn't be available anymore.
4β
5### Affected usages
6β
7Please note, this code mod transforms usages only where the first argument is an object expression.
8β
9The following usage should be transformed by the code mod:
10β
11```ts
12const { data } = useQuery({
13 queryKey: ['posts'],
14 queryFn: queryFn,
15 keepPreviousData: true,
16})
17```
18β
19But the following usage won't be transformed by the code mod, because the first argument an identifier:
20β
21```ts
22const hookArgument = {
23 queryKey: ['posts'],
24 queryFn: queryFn,
25 keepPreviousData: true,
26}
27const { data } = useQuery(hookArgument)
28```
29β
30### Troubleshooting
31β
32In case of any errors, feel free to reach us out via Discord or open an issue. If you open an issue, please provide a code snippet as well, because without a snippet we cannot find the bug in the code mod.