Svelte integration for ElectricSQL, a Postgres sync engine that provides an HTTP interface to Postgres, enabling massive numbers of clients to query and receive real-time updates to data in 'shapes' (subsets of the database). Current stable version is 0.1.4. This package provides a `useShape` hook that pulls shape data into Svelte components. It caches Shape and ShapeStream instances globally, making reuse across components efficient. Requires Svelte 5 and TypeScript types are included. Released in 2025 with no regular release cadence yet.
npm install svelte-electricsqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows use of useShape hook to fetch and display reactive data from an ElectricSQL shape.
Access properties directly on the shape object (e.g., shape.data, shape.loading).
Upgrade to Svelte 5.
Use ESM imports; do not use require().
Do not destructure; use shape.data directly in the template.
Use import statements instead of require().