Download node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js from metarm/QMetaRam: direct link, hf CLI and curl.
- Browser
- Download file 883 Bytes
-
https://huggingface.co/metarm/QMetaRam/resolve/main/node_modules/%40tanstack/react-query/build/legacy/QueryErrorResetBoundary.js
- Command line
-
hf download hf://metarm/QMetaRam/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js
-
curl -L -o QueryErrorResetBoundary.js https://huggingface.co/metarm/QMetaRam/resolve/main/node_modules/%40tanstack/react-query/build/legacy/QueryErrorResetBoundary.js
883 Bytes
| "use client"; | |
| import * as React from "react"; | |
| import { jsx } from "react/jsx-runtime"; | |
| //#region src/QueryErrorResetBoundary.tsx | |
| function createValue() { | |
| let isReset = false; | |
| return { | |
| clearReset: () => { | |
| isReset = false; | |
| }, | |
| reset: () => { | |
| isReset = true; | |
| }, | |
| isReset: () => { | |
| return isReset; | |
| } | |
| }; | |
| } | |
| const QueryErrorResetBoundaryContext = React.createContext(createValue()); | |
| const useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext); | |
| const QueryErrorResetBoundary = ({ children }) => { | |
| const [value] = React.useState(() => createValue()); | |
| return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { | |
| value, | |
| children: typeof children === "function" ? children(value) : children | |
| }); | |
| }; | |
| //#endregion | |
| export { QueryErrorResetBoundary, useQueryErrorResetBoundary }; | |
| //# sourceMappingURL=QueryErrorResetBoundary.js.map |