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

bindLiveQueryWindow.md

39 lines1.1 KB

1---
2id: bindLiveQueryWindow
3title: bindLiveQueryWindow
4---
5​
6```ts
7function bindLiveQueryWindow(
8 previous,
9 update,
10 uncommitted?): LiveQueryWindowBinding;
11```
12​
13Defined in: [packages/db/src/live-query-window-binding.ts:120](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-binding.ts#L120)
14​
15Bind an infinite-query update. Returns `previous` when it still serves the
16update; otherwise returns a new binding whose controller the adapter
17subscribes and later disposes.
18​
19`uncommitted` is a binding built by an earlier update that never took
20effect, such as a React render that did not commit. When it answers this
21update, its window collection is reused instead of compiling another.
22​
23## Parameters
24​
25### previous
26​
27[`LiveQueryWindowBinding`](../interfaces/LiveQueryWindowBinding.md) | `null`
28​
29### update
30​
31[`LiveQueryWindowUpdate`](../interfaces/LiveQueryWindowUpdate.md)
32​
33### uncommitted?
34​
35[`LiveQueryWindowBinding`](../interfaces/LiveQueryWindowBinding.md) | `null`
36​
37## Returns
38​
39[`LiveQueryWindowBinding`](../interfaces/LiveQueryWindowBinding.md)