You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @paramqueryOptions options from the useQuery wrapper
90
90
*/
91
-
exportfunctionuseBadassContext<
91
+
exportfunctionusePetStoreContext<
92
92
TQueryFnData=unknown,
93
93
TError=unknown,
94
94
TData=TQueryFnData,
@@ -115,7 +115,45 @@ export function useBadassContext<
115
115
}
116
116
```
117
117
118
-
You can also tweak `{filenamePrefix}Fetcher.ts`, especially the error management part, so everything fit the expected `ErrorType`.
118
+
You also need to tweak `{filenamePrefix}Fetcher.ts`, to inject your `baseUrl` and adjust the error management part to fullfil the `ErrorType` (you can search for the `TODO` keyword).
119
+
120
+
#### Usage
121
+
122
+
First of all, we need to have a working react-query context (more information [here](https://react-query.tanstack.com/quick-start)).
123
+
124
+
Now that we have all this generated code and properly configured `{filenamePrefix}Fetcher.ts` to talk to the correct server. This is time to try!
125
+
126
+
Assuming that you have a route with the verb `GET` and the `operationId` as `listPets`. You can simply use `useListPets` in a react component.
0 commit comments