Files
SnowLuma/.pnpm-store/v11/files/66/6504bf6c3e878e8e37bc51813468f4cc06edc68cd3dcfb1abab344219e1066ebc8c8c212b820540bf098ba0b3300dd34c8a4a4faf2e152d853cfa1666db8da
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

27 lines
880 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const require_useMatch = require("./useMatch.cjs");
//#region src/useLoaderData.tsx
/**
* Read and select the current route's loader data with type‑safety.
*
* Options:
* - `from`/`strict`: Choose which route's data to read and strictness
* - `select`: Map the loader data to a derived value
* - `structuralSharing`: Enable structural sharing for stable references
*
* @returns The loader data (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook
*/
function useLoaderData(opts) {
return require_useMatch.useMatch({
from: opts.from,
strict: opts.strict,
structuralSharing: opts.structuralSharing,
select: (s) => {
return opts.select ? opts.select(s.loaderData) : s.loaderData;
}
});
}
//#endregion
exports.useLoaderData = useLoaderData;
//# sourceMappingURL=useLoaderData.cjs.map