@stackflow/react
Advanced tools
Comparing version 1.2.1 to 1.2.2
import type { ActivityLoaderArgs } from "@stackflow/config"; | ||
export declare function useLoaderData<T extends (args: ActivityLoaderArgs<any>) => any>(): ReturnType<T>; | ||
export declare function useLoaderData<T extends (args: ActivityLoaderArgs<any>) => any>(): Awaited<ReturnType<T>>; | ||
//# sourceMappingURL=useLoaderData.d.ts.map |
@@ -25,5 +25,6 @@ "use strict"; | ||
var import_stable = require("../../stable"); | ||
var import_use = require("./use"); | ||
function useLoaderData() { | ||
var _a; | ||
return (_a = (0, import_stable.useActivity)().context) == null ? void 0 : _a.loaderData; | ||
return (0, import_use.use)((_a = (0, import_stable.useActivity)().context) == null ? void 0 : _a.loaderData); | ||
} |
import type { ActivityLoaderArgs } from "@stackflow/config"; | ||
export declare function useLoaderData<T extends (args: ActivityLoaderArgs<any>) => any>(): ReturnType<T>; | ||
export declare function useLoaderData<T extends (args: ActivityLoaderArgs<any>) => any>(): Awaited<ReturnType<T>>; | ||
//# sourceMappingURL=useLoaderData.d.ts.map |
import { useActivity } from "../../stable"; | ||
import { use } from "./use"; | ||
function useLoaderData() { | ||
var _a; | ||
return (_a = useActivity().context) == null ? void 0 : _a.loaderData; | ||
return use((_a = useActivity().context) == null ? void 0 : _a.loaderData); | ||
} | ||
@@ -6,0 +7,0 @@ export { |
{ | ||
"name": "@stackflow/react", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
import type { ActivityLoaderArgs } from "@stackflow/config"; | ||
import { useActivity } from "../../stable"; | ||
import { use } from "./use"; | ||
export function useLoaderData< | ||
T extends (args: ActivityLoaderArgs<any>) => any, | ||
>(): ReturnType<T> { | ||
return (useActivity().context as any)?.loaderData; | ||
>(): Awaited<ReturnType<T>> { | ||
return use((useActivity().context as any)?.loaderData); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
383203
430
7118