* 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.
()
| 44 | * @returns The `clearReset`, `isReset`, and `reset` functions of the boundary. |
| 45 | */ |
| 46 | function 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 | |
| 61 | const QueryErrorResetBoundaryContext = createContext(createValue()) |
| 62 |
no outgoing calls
no test coverage detected