npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

solid-dexie

v0.0.5

Published

Dexie integration for SolidJS

Readme

solid-dexie, Dexie integration for Solid

DexieJS is a more friendly wrapper around IndexedDB. IndexedDB allows for the efficient browser storage and retrieval of structured data; it's like a localstorage that's a database.

Solid is a UI framework for browsers that offers reactive hooks.

What this package does is integrate Dexie queries with Solid. It allows you to use IndexedDB databases like you use any data in Solid - it's reactive.

So, you can write Dexie queries that are live: when you add data to your database, the queries and thus your UI automatically updates. The queries are also reactive: if you use signals to construct your query, the query result and thus your UI changes automatically when you update the signals.

Installation

npm install solid-dexie

It declares both solid-js and dexie as peer dependencies, so you also need them installed in your projects.

createDexieArrayQuery

createDexieArrayQuery lets you create live queries. Here's an example:

import { createDexieArrayQuery } from "solid-dexie";

const friends = createDexieArrayQuery(() => db.friends.toArray());

friends is a special Solid store (think createStore). So, you can build UIs with it:

<For each={friends}>
  {(friend) => (
    <div>
      {friend.id} {friend.name} {friend.age}
    </div>
  )}
</For>

The UI updates automatically when you modify the database in some event handler:

const handleAdd = () => {
  await db.friends.add({ name: "Foo", age: 10 });
};

You can also create dynamic queries with signals:

const [value, setValue] = createSignal(0);
const friends = createDexieArrayQuery() => db.friends.where("age").above(value()).toArray());

Now when you modify value with setValue, friends automatically updates to reflect this change.

Optimization note

Internally, createDexieArrayQuery is optimized for arrays - it uses Solid's reconcile function to ensure your data is stable so your UI won't update for objects that don't change. It depends on the primary key of your database table to be id.

createDexieSignalQuery

Some Dexie queries (count(), first(), last(), get()) return non-array values. For this, you should use createDexieSignalQuery, which behaves much like a normal Solid signal.

import { createDexieSignalQuery } from "solid-dexie";

const friendsCount = createDexieSignalQuery(() => db.friends.count());

friendsCount starts out as undefined, then obtains the value of the query.

You use this like any signal in Solid:

<div>My friends count: {friendsCount()}</div>

The signal updates automatically when you modify the database, and is reactive to signals used in a dymnamic query, just like with createDexieArrayQuery.

You should not use createDexieSignalQuery with queries that produce an array (.toArray()), because it causes your UI to redraw for each item for all changes; use createDexieArrayQuery instead. In fact, TypeScript prevents you from using array queries in createDexieSignalQuery to remind you of this.

Development

Running the demo

You can run the demo app by running:

npm run dev

Making a release

You can create a new npm release automatically by doing the following on the main branch:

npm version patch  # or minor, major, etc
git push --follow-tags

npm version updates the version number automatically and also puts the latest date in CHANGELOG.md. You then need to push using --follow-tags (NOT --tags).

The release process is done through a github action defined in .workflows/publish.yml which publishes to the npm registry automatically.