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

injectIsRestoring.md

29 lines880 Bytes

1---
2id: injectIsRestoring
3title: injectIsRestoring
4---
5​
6```ts
7function injectIsRestoring(options?: InjectIsRestoringOptions): Signal<boolean>;
8```
9​
10Defined 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)
11​
12Injects a signal that tracks whether a restore (e.g. from a persisted client, wired up via
13`provideIsRestoring`) is currently in progress. `injectQuery` and friends also check this internally to
14avoid race conditions between the restore and initializing queries.
15​
16## Parameters
17​
18### options?
19​
20`InjectIsRestoringOptions`
21​
22Additional configuration
23​
24## Returns
25​
26`Signal`\<`boolean`\>
27​
28A readonly `Signal<boolean>` β€” `true` while a restore is in progress, `false` otherwise (the
29default when no `provideIsRestoring` provider is registered).