Skip to main content

Built and signed on GitHub Actions

Nano Stores bindings for Firebase Realtime Database

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Bun, Cloudflare Workers
JSR Score
100%
Published
2 months ago (0.1.3)

Nano Stores bindings for Firebase Realtime Database. The state shape in the store is compatible with Nano Stores Query.

Installation

npx jsr add @nanofire/database

Synopsis

import { getFirebaseDatabaseQueryStore } from "@nanofire/database";

// Get a query
const query = ref(db, "path/to/data");

// Get a store corresponding to the query
const $snapshot = getFirebaseDatabaseQueryStore(query);

// Use it as with any other Nano Store
$snapshot.subscribe((state) => {
  // Initial state: { loading: true }
  // When loaded:   { loading: false, data: DataSnapshot }
  console.log(state);
});
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add @nanofire/database

Import symbol

import * as mod from "@nanofire/database";

Add Package

npx jsr add @nanofire/database

Import symbol

import * as mod from "@nanofire/database";

Add Package

yarn dlx jsr add @nanofire/database

Import symbol

import * as mod from "@nanofire/database";

Add Package

pnpm dlx jsr add @nanofire/database

Import symbol

import * as mod from "@nanofire/database";

Add Package

bunx jsr add @nanofire/database

Import symbol

import * as mod from "@nanofire/database";