nanostores

nanostores / sql

Public

Nano Stores wrapper around SQLite or PGLite to generate reactive stores from SQL queries

18
0
100% credibility
Found Apr 07, 2026 at 18 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

Nano Stores SQL is a wrapper for SQLite and PGLite that creates reactive data stores from SQL queries for use in web browsers and React Native apps.

How It Works

1
🔍 Discover the tool

You hear about Nano Stores SQL, a simple way to make your app's data update automatically without you having to refresh anything.

2
🧰 Gather your pieces

You collect the main tool and pick an extra piece that fits your web browser app, mobile app, or test setup.

3
Pick your data style
🖥️
Browser storage

Use easy file-based storage that works right in web pages.

📱
Mobile storage

Connect to storage designed for phone and tablet apps.

🧪
Test storage

Set up quick in-memory storage for trying things out.

4
🔗 Connect your storage

Link your app to the storage file so it can save and load information securely.

5
📝 Request live info

Tell it what data you need, like a list of users matching a name, and it starts delivering fresh results.

6
Watch data update

Your app displays the info and refreshes it instantly whenever anything changes behind the scenes.

7
🛡️ Make safe changes

Add, edit, or remove data with built-in checks to keep everything consistent across your app.

🎉 App feels alive

Your users get smooth, real-time experiences with data always current and responsive.

Sign up to see the full architecture

6 more

Sign Up Free

Star Growth

See how this repo grew from 18 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is sql?

nanostores/sql is a TypeScript library that wraps SQLite or PGLite to turn SQL queries into reactive Nano Stores. It solves the hassle of syncing local databases with UI state by auto-updating stores on data changes, whether using plain SQL strings or Drizzle ORM for type-safe queries. Works in browsers via OPFS, React Native with Expo, or Node.js, keeping bundles tiny for nanostores js and nanostores npm apps.

Why is it gaining traction?

Unlike Zustand or other state managers, it hooks SQL directly to reactivity—no manual polling or event emitters needed—making nanostores react apps feel native with live queries. Supports migrations to handle schema updates across tabs, plus custom drivers for flexibility. Devs dig the tagged template API that prevents SQL injection out of the box, like a github sql tutorial come to life.

Who should use this?

Frontend devs building offline-first Astro nanostores or React Native apps with local persistence, especially those ditching server fetches for SQLocal or PGLite. Ideal for nanostores vs zustand switchers wanting database-backed state without boilerplate, or Expo users needing reactive SQLite.

Verdict

Promising for Nano Stores fans, with solid docs and migration helpers, but at 18 stars and 1.0% credibility, it's early—test in non-prod first. Grab it if you're already on nanostores; skip for production until more battle scars.

(182 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.