@trpc/react-query 11.0.0-alpha-tmp-04-26-resolveResponse-and-multi.439 → 11.0.0-alpha-tmp-app-router-example.364
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/dist/bundle-analysis.json +30 -17
- package/dist/rsc.d.ts +17 -0
- package/dist/rsc.d.ts.map +1 -0
- package/dist/rsc.js +51 -0
- package/dist/rsc.mjs +30 -0
- package/package.json +17 -11
- package/rsc/index.d.ts +1 -0
- package/rsc/index.js +1 -0
- package/src/rsc.tsx +72 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 54.
|
|
2
|
+
"bundleSize": 29442,
|
|
3
|
+
"bundleOrigSize": 64714,
|
|
4
|
+
"bundleReduction": 54.5,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/shared/hooks/createHooksInternal.tsx",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/createTRPCReact.tsx"
|
|
16
16
|
],
|
|
17
|
-
"percent":
|
|
17
|
+
"percent": 43.72,
|
|
18
18
|
"reduction": 13.84
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"/src/createTRPCQueryUtils.tsx",
|
|
30
30
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
31
31
|
],
|
|
32
|
-
"percent":
|
|
32
|
+
"percent": 12.85,
|
|
33
33
|
"reduction": 6.34
|
|
34
34
|
},
|
|
35
35
|
{
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependents": [
|
|
44
44
|
"/src/server/index.ts"
|
|
45
45
|
],
|
|
46
|
-
"percent": 12.
|
|
46
|
+
"percent": 12.48,
|
|
47
47
|
"reduction": 50.38
|
|
48
48
|
},
|
|
49
49
|
{
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependents": [
|
|
60
60
|
"/src/shared/index.ts"
|
|
61
61
|
],
|
|
62
|
-
"percent":
|
|
62
|
+
"percent": 9.74,
|
|
63
63
|
"reduction": 74.38
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -73,14 +73,27 @@
|
|
|
73
73
|
"removedExports": [],
|
|
74
74
|
"dependents": [
|
|
75
75
|
"/src/index.ts",
|
|
76
|
+
"/src/rsc.tsx",
|
|
76
77
|
"/src/server/ssgProxy.ts",
|
|
77
78
|
"/src/shared/proxy/utilsProxy.ts",
|
|
78
79
|
"/src/shared/proxy/useQueriesProxy.ts",
|
|
79
80
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
80
81
|
],
|
|
81
|
-
"percent":
|
|
82
|
+
"percent": 6.79,
|
|
82
83
|
"reduction": 42.49
|
|
83
84
|
},
|
|
85
|
+
{
|
|
86
|
+
"id": "/src/rsc.tsx",
|
|
87
|
+
"size": 881,
|
|
88
|
+
"origSize": 2101,
|
|
89
|
+
"renderedExports": [
|
|
90
|
+
"createHydrationHelpers"
|
|
91
|
+
],
|
|
92
|
+
"removedExports": [],
|
|
93
|
+
"dependents": [],
|
|
94
|
+
"percent": 2.99,
|
|
95
|
+
"reduction": 58.07
|
|
96
|
+
},
|
|
84
97
|
{
|
|
85
98
|
"id": "/src/createTRPCReact.tsx",
|
|
86
99
|
"size": 850,
|
|
@@ -93,7 +106,7 @@
|
|
|
93
106
|
"dependents": [
|
|
94
107
|
"/src/index.ts"
|
|
95
108
|
],
|
|
96
|
-
"percent": 2.
|
|
109
|
+
"percent": 2.89,
|
|
97
110
|
"reduction": 89.28
|
|
98
111
|
},
|
|
99
112
|
{
|
|
@@ -107,7 +120,7 @@
|
|
|
107
120
|
"dependents": [
|
|
108
121
|
"/src/shared/index.ts"
|
|
109
122
|
],
|
|
110
|
-
"percent": 2.
|
|
123
|
+
"percent": 2.74,
|
|
111
124
|
"reduction": 23.16
|
|
112
125
|
},
|
|
113
126
|
{
|
|
@@ -122,7 +135,7 @@
|
|
|
122
135
|
"/src/shared/index.ts",
|
|
123
136
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
124
137
|
],
|
|
125
|
-
"percent": 1.
|
|
138
|
+
"percent": 1.93,
|
|
126
139
|
"reduction": 82.03
|
|
127
140
|
},
|
|
128
141
|
{
|
|
@@ -138,7 +151,7 @@
|
|
|
138
151
|
"/src/shared/hooks/createHooksInternal.tsx",
|
|
139
152
|
"/src/utils/createUtilityFunctions.ts"
|
|
140
153
|
],
|
|
141
|
-
"percent": 1.
|
|
154
|
+
"percent": 1.61,
|
|
142
155
|
"reduction": 17.31
|
|
143
156
|
},
|
|
144
157
|
{
|
|
@@ -152,7 +165,7 @@
|
|
|
152
165
|
"dependents": [
|
|
153
166
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
154
167
|
],
|
|
155
|
-
"percent": 0.
|
|
168
|
+
"percent": 0.75,
|
|
156
169
|
"reduction": 36.21
|
|
157
170
|
},
|
|
158
171
|
{
|
|
@@ -166,7 +179,7 @@
|
|
|
166
179
|
"dependents": [
|
|
167
180
|
"/src/index.ts"
|
|
168
181
|
],
|
|
169
|
-
"percent": 0.
|
|
182
|
+
"percent": 0.55,
|
|
170
183
|
"reduction": 66.6
|
|
171
184
|
},
|
|
172
185
|
{
|
|
@@ -184,7 +197,7 @@
|
|
|
184
197
|
"/src/shared/proxy/utilsProxy.ts",
|
|
185
198
|
"/src/shared/hooks/createHooksInternal.tsx"
|
|
186
199
|
],
|
|
187
|
-
"percent": 0.
|
|
200
|
+
"percent": 0.52,
|
|
188
201
|
"reduction": 97.59
|
|
189
202
|
},
|
|
190
203
|
{
|
|
@@ -198,7 +211,7 @@
|
|
|
198
211
|
"dependents": [
|
|
199
212
|
"/src/shared/index.ts"
|
|
200
213
|
],
|
|
201
|
-
"percent": 0.
|
|
214
|
+
"percent": 0.44,
|
|
202
215
|
"reduction": 74.9
|
|
203
216
|
},
|
|
204
217
|
{
|
|
@@ -236,5 +249,5 @@
|
|
|
236
249
|
"reduction": 100
|
|
237
250
|
}
|
|
238
251
|
],
|
|
239
|
-
"moduleCount":
|
|
252
|
+
"moduleCount": 17
|
|
240
253
|
}
|
package/dist/rsc.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { type AnyRouter, type inferProcedureInput, type RouterRecord } from '@trpc/server/unstable-core-do-not-import';
|
|
3
|
+
import type { AnyProcedure, inferProcedureOutput, RouterCaller, TypeError } from '@trpc/server/unstable-core-do-not-import';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
type DecorateProcedure<TProcedure extends AnyProcedure> = (input: inferProcedureInput<TProcedure>) => Promise<inferProcedureOutput<TProcedure>>;
|
|
6
|
+
type DecorateRouterRecord<TRecord extends RouterRecord> = {
|
|
7
|
+
[TKey in keyof TRecord]: TRecord[TKey] extends AnyProcedure ? DecorateProcedure<TRecord[TKey]> : TRecord[TKey] extends RouterRecord ? DecorateRouterRecord<TRecord[TKey]> : never;
|
|
8
|
+
};
|
|
9
|
+
type Caller<TRouter extends AnyRouter> = ReturnType<RouterCaller<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>>;
|
|
10
|
+
export declare function createHydrationHelpers<TRouter extends AnyRouter>(caller: AnyRouter extends TRouter ? TypeError<'Generic parameter missing in `createHydrationHelpers<HERE>`'> : Caller<TRouter>, getQueryClient: () => QueryClient): {
|
|
11
|
+
trpc: DecorateRouterRecord<TRouter["_def"]["record"]>;
|
|
12
|
+
HydrateClient: (props: {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}) => React.JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=rsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../src/rsc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACV,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,iBAAiB,CAAC,UAAU,SAAS,YAAY,IAAI,CACxD,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,KACnC,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/C,KAAK,oBAAoB,CAAC,OAAO,SAAS,YAAY,IAAI;KACvD,IAAI,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,YAAY,GACvD,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,SAAS,YAAY,GAClC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GACnC,KAAK;CACV,CAAC;AAEF,KAAK,MAAM,CAAC,OAAO,SAAS,SAAS,IAAI,UAAU,CACjD,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAC9E,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,SAAS,EAC9D,MAAM,EAAE,SAAS,SAAS,OAAO,GAC7B,SAAS,CAAC,6DAA6D,CAAC,GACxE,MAAM,CAAC,OAAO,CAAC,EACnB,cAAc,EAAE,MAAM,WAAW;;2BAoBH;QAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;KAAE;EAW5D"}
|
package/dist/rsc.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reactQuery = require('@tanstack/react-query');
|
|
4
|
+
var unstableCoreDoNotImport = require('@trpc/server/unstable-core-do-not-import');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var getQueryKey = require('./internals/getQueryKey.js');
|
|
7
|
+
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
26
|
+
|
|
27
|
+
function createHydrationHelpers(caller, getQueryClient) {
|
|
28
|
+
const wrappedProxy = unstableCoreDoNotImport.createRecursiveProxy(async ({ path , args })=>{
|
|
29
|
+
const proc = path.reduce(// @ts-expect-error - ??
|
|
30
|
+
(acc, key)=>acc[key], caller);
|
|
31
|
+
const [input] = args;
|
|
32
|
+
const promise = proc(input);
|
|
33
|
+
void getQueryClient().prefetchQuery({
|
|
34
|
+
queryKey: getQueryKey.getQueryKeyInternal(path, input, 'query'),
|
|
35
|
+
queryFn: ()=>promise
|
|
36
|
+
});
|
|
37
|
+
return promise;
|
|
38
|
+
});
|
|
39
|
+
function HydrateClient(props) {
|
|
40
|
+
const dehydratedState = reactQuery.dehydrate(getQueryClient()); // TODO: transform??
|
|
41
|
+
return /*#__PURE__*/ React__namespace.createElement(reactQuery.HydrationBoundary, {
|
|
42
|
+
state: dehydratedState
|
|
43
|
+
}, props.children);
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
trpc: wrappedProxy,
|
|
47
|
+
HydrateClient
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
exports.createHydrationHelpers = createHydrationHelpers;
|
package/dist/rsc.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
|
2
|
+
import { createRecursiveProxy } from '@trpc/server/unstable-core-do-not-import';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { getQueryKeyInternal } from './internals/getQueryKey.mjs';
|
|
5
|
+
|
|
6
|
+
function createHydrationHelpers(caller, getQueryClient) {
|
|
7
|
+
const wrappedProxy = createRecursiveProxy(async ({ path , args })=>{
|
|
8
|
+
const proc = path.reduce(// @ts-expect-error - ??
|
|
9
|
+
(acc, key)=>acc[key], caller);
|
|
10
|
+
const [input] = args;
|
|
11
|
+
const promise = proc(input);
|
|
12
|
+
void getQueryClient().prefetchQuery({
|
|
13
|
+
queryKey: getQueryKeyInternal(path, input, 'query'),
|
|
14
|
+
queryFn: ()=>promise
|
|
15
|
+
});
|
|
16
|
+
return promise;
|
|
17
|
+
});
|
|
18
|
+
function HydrateClient(props) {
|
|
19
|
+
const dehydratedState = dehydrate(getQueryClient()); // TODO: transform??
|
|
20
|
+
return /*#__PURE__*/ React.createElement(HydrationBoundary, {
|
|
21
|
+
state: dehydratedState
|
|
22
|
+
}, props.children);
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
trpc: wrappedProxy,
|
|
26
|
+
HydrateClient
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { createHydrationHelpers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/react-query",
|
|
3
|
-
"version": "11.0.0-alpha-tmp-
|
|
3
|
+
"version": "11.0.0-alpha-tmp-app-router-example.364+4d068acf1",
|
|
4
4
|
"description": "The tRPC React library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"require": "./dist/index.js",
|
|
28
28
|
"default": "./dist/index.js"
|
|
29
29
|
},
|
|
30
|
+
"./rsc": {
|
|
31
|
+
"import": "./dist/rsc.mjs",
|
|
32
|
+
"require": "./dist/rsc.js",
|
|
33
|
+
"default": "./dist/rsc.js"
|
|
34
|
+
},
|
|
30
35
|
"./server": {
|
|
31
36
|
"import": "./dist/server/index.mjs",
|
|
32
37
|
"require": "./dist/server/index.js",
|
|
@@ -43,6 +48,7 @@
|
|
|
43
48
|
"src",
|
|
44
49
|
"README.md",
|
|
45
50
|
"package.json",
|
|
51
|
+
"rsc",
|
|
46
52
|
"server",
|
|
47
53
|
"shared",
|
|
48
54
|
"!**/*.test.*"
|
|
@@ -57,24 +63,24 @@
|
|
|
57
63
|
}
|
|
58
64
|
},
|
|
59
65
|
"peerDependencies": {
|
|
60
|
-
"@tanstack/react-query": "^5.
|
|
61
|
-
"@trpc/client": "11.0.0-alpha-tmp-
|
|
62
|
-
"@trpc/server": "11.0.0-alpha-tmp-
|
|
66
|
+
"@tanstack/react-query": "^5.40.0",
|
|
67
|
+
"@trpc/client": "11.0.0-alpha-tmp-app-router-example.364+4d068acf1",
|
|
68
|
+
"@trpc/server": "11.0.0-alpha-tmp-app-router-example.364+4d068acf1",
|
|
63
69
|
"react": ">=18.2.0",
|
|
64
70
|
"react-dom": ">=18.2.0"
|
|
65
71
|
},
|
|
66
72
|
"devDependencies": {
|
|
67
|
-
"@tanstack/react-query": "^5.
|
|
68
|
-
"@trpc/client": "11.0.0-alpha-tmp-
|
|
69
|
-
"@trpc/server": "11.0.0-alpha-tmp-
|
|
73
|
+
"@tanstack/react-query": "^5.40.0",
|
|
74
|
+
"@trpc/client": "11.0.0-alpha-tmp-app-router-example.364+4d068acf1",
|
|
75
|
+
"@trpc/server": "11.0.0-alpha-tmp-app-router-example.364+4d068acf1",
|
|
70
76
|
"@types/express": "^4.17.17",
|
|
71
77
|
"@types/node": "^20.10.0",
|
|
72
|
-
"@types/react": "^18.3.
|
|
78
|
+
"@types/react": "^18.3.1",
|
|
73
79
|
"eslint": "^8.56.0",
|
|
74
80
|
"express": "^4.17.1",
|
|
75
81
|
"next": "^14.1.4",
|
|
76
|
-
"react": "^18.3.
|
|
77
|
-
"react-dom": "^18.3.
|
|
82
|
+
"react": "^18.3.1",
|
|
83
|
+
"react-dom": "^18.3.1",
|
|
78
84
|
"rollup": "^4.9.5",
|
|
79
85
|
"tsx": "^4.0.0",
|
|
80
86
|
"zod": "^3.0.0"
|
|
@@ -85,5 +91,5 @@
|
|
|
85
91
|
"funding": [
|
|
86
92
|
"https://trpc.io/sponsor"
|
|
87
93
|
],
|
|
88
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "4d068acf1d662ab7a081af1641ee5831f5f78d51"
|
|
89
95
|
}
|
package/rsc/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/rsc';
|
package/rsc/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/rsc');
|
package/src/rsc.tsx
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dehydrate,
|
|
3
|
+
HydrationBoundary,
|
|
4
|
+
type QueryClient,
|
|
5
|
+
} from '@tanstack/react-query';
|
|
6
|
+
import {
|
|
7
|
+
createRecursiveProxy,
|
|
8
|
+
type AnyRouter,
|
|
9
|
+
type inferProcedureInput,
|
|
10
|
+
type RouterRecord,
|
|
11
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
12
|
+
import type {
|
|
13
|
+
AnyProcedure,
|
|
14
|
+
inferProcedureOutput,
|
|
15
|
+
RouterCaller,
|
|
16
|
+
TypeError,
|
|
17
|
+
} from '@trpc/server/unstable-core-do-not-import';
|
|
18
|
+
import * as React from 'react';
|
|
19
|
+
import { getQueryKeyInternal } from './internals/getQueryKey';
|
|
20
|
+
|
|
21
|
+
type DecorateProcedure<TProcedure extends AnyProcedure> = (
|
|
22
|
+
input: inferProcedureInput<TProcedure>,
|
|
23
|
+
) => Promise<inferProcedureOutput<TProcedure>>;
|
|
24
|
+
|
|
25
|
+
type DecorateRouterRecord<TRecord extends RouterRecord> = {
|
|
26
|
+
[TKey in keyof TRecord]: TRecord[TKey] extends AnyProcedure
|
|
27
|
+
? DecorateProcedure<TRecord[TKey]>
|
|
28
|
+
: TRecord[TKey] extends RouterRecord
|
|
29
|
+
? DecorateRouterRecord<TRecord[TKey]>
|
|
30
|
+
: never;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type Caller<TRouter extends AnyRouter> = ReturnType<
|
|
34
|
+
RouterCaller<TRouter['_def']['_config']['$types'], TRouter['_def']['record']>
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
export function createHydrationHelpers<TRouter extends AnyRouter>(
|
|
38
|
+
caller: AnyRouter extends TRouter
|
|
39
|
+
? TypeError<'Generic parameter missing in `createHydrationHelpers<HERE>`'>
|
|
40
|
+
: Caller<TRouter>,
|
|
41
|
+
getQueryClient: () => QueryClient,
|
|
42
|
+
) {
|
|
43
|
+
const wrappedProxy = createRecursiveProxy(async ({ path, args }) => {
|
|
44
|
+
const proc = path.reduce(
|
|
45
|
+
// @ts-expect-error - ??
|
|
46
|
+
(acc, key) => acc[key],
|
|
47
|
+
caller,
|
|
48
|
+
) as unknown as DecorateProcedure<AnyProcedure>;
|
|
49
|
+
|
|
50
|
+
const [input] = args;
|
|
51
|
+
const promise = proc(input);
|
|
52
|
+
|
|
53
|
+
void getQueryClient().prefetchQuery({
|
|
54
|
+
queryKey: getQueryKeyInternal(path, input, 'query'),
|
|
55
|
+
queryFn: () => promise,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return promise;
|
|
59
|
+
}) as DecorateRouterRecord<TRouter['_def']['record']>;
|
|
60
|
+
|
|
61
|
+
function HydrateClient(props: { children: React.ReactNode }) {
|
|
62
|
+
const dehydratedState = dehydrate(getQueryClient()); // TODO: transform??
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<HydrationBoundary state={dehydratedState}>
|
|
66
|
+
{props.children}
|
|
67
|
+
</HydrationBoundary>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return { trpc: wrappedProxy, HydrateClient };
|
|
72
|
+
}
|