@trpc/react-query 11.0.0-rc.577 → 11.0.0-rc.580
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 +47 -44
- package/dist/internals/context.d.ts +16 -2
- package/dist/internals/context.d.ts.map +1 -1
- package/dist/internals/trpcResult.d.ts +18 -0
- package/dist/internals/trpcResult.d.ts.map +1 -0
- package/dist/internals/trpcResult.js +63 -0
- package/dist/internals/trpcResult.mjs +40 -0
- package/dist/server/ssgProxy.d.ts +6 -23
- package/dist/server/ssgProxy.d.ts.map +1 -1
- package/dist/server/ssgProxy.js +16 -0
- package/dist/server/ssgProxy.mjs +16 -0
- package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/createHooksInternal.js +7 -24
- package/dist/shared/hooks/createHooksInternal.mjs +2 -19
- package/dist/shared/hooks/types.d.ts +1 -1
- package/dist/shared/hooks/types.d.ts.map +1 -1
- package/dist/shared/proxy/utilsProxy.d.ts +23 -2
- package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
- package/dist/shared/proxy/utilsProxy.js +4 -0
- package/dist/shared/proxy/utilsProxy.mjs +4 -0
- package/dist/shared/types.d.ts +55 -2
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.d.ts +2 -2
- package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.js +66 -0
- package/dist/utils/createUtilityFunctions.mjs +66 -0
- package/package.json +7 -7
- package/src/internals/context.tsx +76 -1
- package/src/internals/trpcResult.ts +55 -0
- package/src/server/ssgProxy.ts +19 -63
- package/src/shared/hooks/createHooksInternal.tsx +8 -20
- package/src/shared/hooks/types.ts +1 -1
- package/src/shared/proxy/utilsProxy.ts +110 -2
- package/src/shared/types.ts +202 -1
- package/src/utils/createUtilityFunctions.ts +90 -2
- package/dist/internals/useHookResult.d.ts +0 -8
- package/dist/internals/useHookResult.d.ts.map +0 -1
- package/dist/internals/useHookResult.js +0 -35
- package/dist/internals/useHookResult.mjs +0 -14
- package/src/internals/useHookResult.ts +0 -17
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Makes a stable reference of the `trpc` prop
|
|
5
|
-
*/ function useHookResult(value) {
|
|
6
|
-
const path = value.path.join('.');
|
|
7
|
-
return React.useMemo(()=>({
|
|
8
|
-
path
|
|
9
|
-
}), [
|
|
10
|
-
path
|
|
11
|
-
]);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { useHookResult };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { TRPCHookResult } from '../shared/hooks/types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Makes a stable reference of the `trpc` prop
|
|
6
|
-
*/
|
|
7
|
-
export function useHookResult(value: {
|
|
8
|
-
path: readonly string[];
|
|
9
|
-
}): TRPCHookResult['trpc'] {
|
|
10
|
-
const path = value.path.join('.');
|
|
11
|
-
return React.useMemo(
|
|
12
|
-
() => ({
|
|
13
|
-
path,
|
|
14
|
-
}),
|
|
15
|
-
[path],
|
|
16
|
-
);
|
|
17
|
-
}
|