Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import { LiveData } from 'modelence/server'; ... getTodos({ userId }, context) { return new LiveData({ fetch: async () => await dbTodos.fetch({ userId }), watch: ({ publish }) => { // Subscribe to changes and call publish when data changes listener.onChange(publish); return () => { // Cleanup function to unsubscribe from changes }; } }); }
T
unknown
new LiveData<T>(config): LiveData<T>
config
LiveData
LiveDataConfig
fetch
readonly
Promise
watch
LiveQueryWatch