@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.
Files changed (40) hide show
  1. package/dist/bundle-analysis.json +47 -44
  2. package/dist/internals/context.d.ts +16 -2
  3. package/dist/internals/context.d.ts.map +1 -1
  4. package/dist/internals/trpcResult.d.ts +18 -0
  5. package/dist/internals/trpcResult.d.ts.map +1 -0
  6. package/dist/internals/trpcResult.js +63 -0
  7. package/dist/internals/trpcResult.mjs +40 -0
  8. package/dist/server/ssgProxy.d.ts +6 -23
  9. package/dist/server/ssgProxy.d.ts.map +1 -1
  10. package/dist/server/ssgProxy.js +16 -0
  11. package/dist/server/ssgProxy.mjs +16 -0
  12. package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
  13. package/dist/shared/hooks/createHooksInternal.js +7 -24
  14. package/dist/shared/hooks/createHooksInternal.mjs +2 -19
  15. package/dist/shared/hooks/types.d.ts +1 -1
  16. package/dist/shared/hooks/types.d.ts.map +1 -1
  17. package/dist/shared/proxy/utilsProxy.d.ts +23 -2
  18. package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
  19. package/dist/shared/proxy/utilsProxy.js +4 -0
  20. package/dist/shared/proxy/utilsProxy.mjs +4 -0
  21. package/dist/shared/types.d.ts +55 -2
  22. package/dist/shared/types.d.ts.map +1 -1
  23. package/dist/utils/createUtilityFunctions.d.ts +2 -2
  24. package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
  25. package/dist/utils/createUtilityFunctions.js +66 -0
  26. package/dist/utils/createUtilityFunctions.mjs +66 -0
  27. package/package.json +7 -7
  28. package/src/internals/context.tsx +76 -1
  29. package/src/internals/trpcResult.ts +55 -0
  30. package/src/server/ssgProxy.ts +19 -63
  31. package/src/shared/hooks/createHooksInternal.tsx +8 -20
  32. package/src/shared/hooks/types.ts +1 -1
  33. package/src/shared/proxy/utilsProxy.ts +110 -2
  34. package/src/shared/types.ts +202 -1
  35. package/src/utils/createUtilityFunctions.ts +90 -2
  36. package/dist/internals/useHookResult.d.ts +0 -8
  37. package/dist/internals/useHookResult.d.ts.map +0 -1
  38. package/dist/internals/useHookResult.js +0 -35
  39. package/dist/internals/useHookResult.mjs +0 -14
  40. 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
- }