@ventlio/tanstack-query 0.2.37 → 0.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,21 +48,14 @@ NEXT_PUBLIC_API_TIMEOUT=300000
|
|
|
48
48
|
```
|
|
49
49
|
```js
|
|
50
50
|
import { QueryClient } from '@tanstack/react-query';
|
|
51
|
-
import { TanstackQueryConfig } from '@ventlio/tanstack-query';
|
|
51
|
+
import { TanstackQueryConfig, bootstrapQueryRequest } from '@ventlio/tanstack-query';
|
|
52
52
|
|
|
53
53
|
// Global queryClient
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const queryClient = new QueryClient();
|
|
56
55
|
|
|
57
56
|
// do this before adding the queryClient to QueryClientProvider
|
|
58
|
-
queryClient
|
|
59
|
-
|
|
60
|
-
(['config'],
|
|
61
|
-
{
|
|
62
|
-
headers: {
|
|
63
|
-
Authorization: `Bearer Hello`,
|
|
64
|
-
},
|
|
65
|
-
});
|
|
57
|
+
bootstrapQueryRequest(queryClient);
|
|
58
|
+
|
|
66
59
|
```
|
|
67
60
|
|
|
68
61
|
You can now use it in a QueryClientProvider
|