Realtime sync, live on this page
convex-svelte realtime by default.
Real-time Convex integration for Svelte/SvelteKit. The demo below is backed by live queries — open a second tab and watch it sync.
$ npm i convex-svelte
Chat Demo
usePaginatedQuery · optimistic updatesconst messages = usePaginatedQuery(
api.messages.paginatedList,
{ searchWords: [] },
{ initialNumItems: 3, keepPreviousData: true }
);
// optimistic send: shows instantly, reconciles on server confirm
client.mutation(api.messages.send, { author, body }, {
optimisticUpdate: (store) => {
const first = store
.getAllQueries(api.messages.paginatedList)
.find((q) => q.value && q.args.paginationOpts.cursor === null);
if (!first?.value) return;
store.setQuery(api.messages.paginatedList, first.args, {
...first.value,
page: [{ author, body, optimistic: true }, ...first.value.page]
});
}
});- someone else? Aug 8, 2026 Server
jythfghterytr
- me Aug 18, 2026 Server
Function jumping i think im up to something
- Peter Aug 28, 2026 Server
But local first when? Who fills the vacuum left by InstantDB?