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

provideIsRestoring.md

30 lines903 Bytes

1---
2id: provideIsRestoring
3title: provideIsRestoring
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8```ts
9function provideIsRestoring(isRestoring: Signal<boolean>): Provider;
10```
11​
12Defined in: [packages/angular-query-experimental/src/inject-is-restoring.ts:48](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/inject-is-restoring.ts#L48)
13​
14Registers a provider for the restore state read by `injectIsRestoring`. Wire this up wherever you drive a
15restore yourself β€” e.g. a persist-client integration β€” so `injectQuery` and friends can defer subscribing
16to their observer (avoiding a race with the restore) until the restore signal flips back to `false`.
17​
18## Parameters
19​
20### isRestoring
21​
22`Signal`\<`boolean`\>
23​
24A readonly `Signal<boolean>` that tracks the restore state.
25​
26## Returns
27​
28`Provider`
29​
30A provider for the `isRestoring` signal.