MCPcopy Create free account
hub / github.com/TanStack/query / createValue

Function createValue

packages/preact-query/src/QueryErrorResetBoundary.tsx:46–59  ·  view source on GitHub ↗

* Creates the value shared through the boundary's context, which tracks whether a reset was * requested. * @returns The `clearReset`, `isReset`, and `reset` functions of the boundary.

()

Source from the content-addressed store, hash-verified

44 * @returns The `clearReset`, `isReset`, and `reset` functions of the boundary.
45 */
46function createValue(): QueryErrorResetBoundaryValue {
47 let isReset = false
48 return {
49 clearReset: () => {
50 isReset = false
51 },
52 reset: () => {
53 isReset = true
54 },
55 isReset: () => {
56 return isReset
57 },
58 }
59}
60
61const QueryErrorResetBoundaryContext = createContext(createValue())
62

Callers 2

QueryErrorResetBoundaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected