MCPcopy Index your code
hub / github.com/electric-sql/pglite / useLiveQuery

Function useLiveQuery

packages/pglite-react/src/hooks.ts:114–119  ·  view source on GitHub ↗
(
  query: string | LiveQuery<T> | Promise<LiveQuery<T>>,
  params?: unknown[] | null,
)

Source from the content-addressed store, hash-verified

112): LiveQueryResults<T> | undefined
113
114export function useLiveQuery<T = { [key: string]: unknown }>(
115 query: string | LiveQuery<T> | Promise<LiveQuery<T>>,
116 params?: unknown[] | null,
117): LiveQueryResults<T> | undefined {
118 return useLiveQueryImpl<T>(query, params)
119}
120
121useLiveQuery.sql = function <T = { [key: string]: unknown }>(
122 strings: TemplateStringsArray,

Callers 2

testLiveQueryFunction · 0.90
MyPGliteItemsComponentFunction · 0.90

Calls 1

useLiveQueryImplFunction · 0.70

Tested by 1

testLiveQueryFunction · 0.72