this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 20 lines 1.0 kB view raw view rendered
1## Electric SQL synced collection 2 3Live queries use Electric SQL to keep client-side data in sync with the server database in real time. Instead of polling or manual refetching, database changes are pushed to connected clients automatically. 4 5### How it works 6 71. The client establishes a sync connection to the Electric SQL server 82. A live query is defined using the TanStack DB collection API 93. When database records change, updates stream to connected clients 104. The UI re-renders automatically with fresh data 11 12### Benefits 13 14- **Real-time updates**: Changes appear immediately without manual refresh 15- **Offline support**: Local data remains available during connectivity interruptions 16- **Multi-user**: All connected clients see each other's changes in real time 17 18### Trade-offs 19 20Live queries require the Electric SQL sync infrastructure. They introduce additional complexity compared to simple REST fetching but are the right choice for collaborative or real-time applications where data freshness matters.