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

injectIsRestoring.md

31 lines953 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(options?: InjectIsRestoringOptions): Signal<boolean>;
10```
11​
12Defined in: [packages/angular-query-experimental/src/inject-is-restoring.ts:35](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/inject-is-restoring.ts#L35)
13​
14Injects a signal that tracks whether a restore (e.g. from a persisted client, wired up via
15`provideIsRestoring`) is currently in progress. `injectQuery` and friends also check this internally to
16avoid race conditions between the restore and initializing queries.
17​
18## Parameters
19​
20### options?
21​
22`InjectIsRestoringOptions`
23​
24Additional configuration
25​
26## Returns
27​
28`Signal`\<`boolean`\>
29​
30A readonly `Signal<boolean>` β€” `true` while a restore is in progress, `false` otherwise (the
31default when no `provideIsRestoring` provider is registered).