I've spent the last few weeks experimenting with different local-first /...


I've spent the last few weeks experimenting with different local-first / sync engine solutions.

So far I've built the same app using:
@convex_dev
@zero__ms
@ElectricSQL

These are compelling options with different tradeoffs.

-I found Convex easiest to get started. It uses a document DB with an optional schema, the query syntax is elegant, and a single command fires up the dev environment including a handy dashboard.
-Electric uses Postgres in the browser and seems most configurable and most terse by default. The autogenerated strongly typed query API works great.
-Zero also supports Postgres (other DBs may be supported later). It provides a client-side query API called ZQL. It's exciting because it's built by same team that built Replicache. But, it's in Alpha, so the API isn't stable yet.

All 3 are TypeScript friendly and provide strongly typed query APIs.

All 3 also provide components/hooks that work great with React. Using any of these means you'll rarely need useEffect or useState. 🔥

Here's a querying comparison. All 3 provide "live queries" so the UI automatically reflects any DB changes immediately.

View original on X