UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

13 lines (11 loc) 298 B
// TODO get proper type type Query = any export function subscribeToZeroQuery(query: Query, onUpdate: (val: any) => void): () => void { const view = query.materialize() view.hydrate() const unsubscribe = view.addListener(onUpdate) return () => { unsubscribe() view.destroy() } }