Back to Integrations
Vadyl + Svelte
Cybernetically enhanced web apps. Vadyl stores integrate naturally with Svelte's reactivity.
npm install @vadyl/svelte
Svelte Stores
SvelteKit Support
SSR Compatible
Real-time Bindings
Implementation Guide
1
Create a Store
Vadyl queries return Svelte stores for automatic UI updates.
import { vadyl } from '$lib/vadyl';
import { readable } from 'svelte/store';
export const todos = readable([], (set) => {
vadyl.from('todos').select('*').then(({ data }) => set(data));
const subscription = vadyl
.from('todos')
.on('*', payload => {
// Update logic
})
.subscribe();
return () => subscription.unsubscribe();
});