electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.47k stars 156 forks source link

Create an Electric TanStack integration library #1882

Open thruflo opened 1 month ago

thruflo commented 1 month ago

Build on the doc page https://electric-sql.com/docs/integrations/tanstack and wrap up the tanstack-example (edit: updated link, thanks @Dosbodoke) into an @electric-sql/tanstack integration library.

This can potentially provide a higher level interface to sync and update data that's based on using Electric with TanStack.

Dosbodoke commented 1 week ago

The tanstack-example anchor is linking to the wrong directory. You may want to update the issue linking to the actual tanstack example

Also, I think a good example of the wrapper API may be:

https://legendapp.com/open-source/state/v3/sync/tanstack-query/ https://github.com/psteinroe/supabase-cache-helpers/tree/main/packages/postgrest-react-query