Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

injectIsRestoring.md

23 lines808 Bytes

1---
2id: injectIsRestoring
3title: injectIsRestoring
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8```ts
9function injectIsRestoring(): Signal<boolean>;
10```
11​
12Defined in: [packages/angular-query/src/inject-is-restoring.ts:23](https://github.com/TanStack/query/blob/main/packages/angular-query/src/inject-is-restoring.ts#L23)
13​
14Injects a signal that tracks whether a restore (e.g. from a persisted client, wired up via
15`withPersistQueryClient`) is currently in progress. `injectQuery` and friends also check this internally
16to avoid race conditions between the restore and initializing queries.
17​
18## Returns
19​
20`Signal`\<`boolean`\>
21​
22A readonly `Signal<boolean>` β€” `true` while a restore is in progress, `false` otherwise (the
23default when no persistence integration is registered).