@ventlio/tanstack-query 0.2.37 → 0.2.39

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.
Files changed (2) hide show
  1. package/README.md +6 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -38,31 +38,24 @@ Follow the below instructions to have the package running on your project
38
38
  ### Set the environment variables
39
39
  ```env
40
40
  # For ReactJS
41
- REACT_APP_API_URL='https://build.ventlio.com'
41
+ REACT_APP_API_URL='https://api.example.com'
42
42
  REACT_APP_API_TIMEOUT=300000
43
43
 
44
44
  # For NextJS
45
- NEXT_PUBLIC_API_URL='https://build.ventlio.com'
45
+ NEXT_PUBLIC_API_URL='https://api.example.com'
46
46
  NEXT_PUBLIC_API_TIMEOUT=300000
47
47
 
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
- bootstrapQueryRequest(queryClient);
55
-
54
+ const queryClient = new QueryClient();
56
55
 
57
56
  // do this before adding the queryClient to QueryClientProvider
58
- queryClient.setQueryData <
59
- TanstackQueryConfig >
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ventlio/tanstack-query",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "contributors": [