Registry / database / cojson-storage-rn-sqlite

cojson-storage-rn-sqlite

JSON →
library0.12.1jsnpmunverified

Persistence layer for CoJSON data in React Native apps using SQLite. Part of the Jazz framework (jazz.tools), version 0.12.1. Enables offline-first storage for collaborative JSON documents with automatic sync. Key differentiator: seamless integration with Jazz's reactive state management and live sync engine, supports both in-memory and disk-based persistence. Released under MIT license.

npm install cojson-storage-rn-sqlite
INSTALL
IMPORT
SIG · COJSON-STORAGE-RN-
C
cojson-storage-rn-sqlite
databasejavascriptv0.12.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createSQLiteStorage
import { createSQLiteStorage } from 'cojson-storage-rn-sqlite'
import createSQLiteStorage from 'cojson-storage-rn-sqlite'
Named export, not default. ESM only.

Shows setting up SQLite storage with Jazz provider in React Native.

import { createSQLiteStorage } from 'cojson-storage-rn-sqlite'; import { SQLiteProvider, useSQLiteDatabase } from 'react-native-sqlite-storage'; function App() { const db = useSQLiteDatabase(); const storage = createSQLiteStorage(db); // Pass to Jazz return <JazzProvider storage={storage}><YourApp /></JazzProvider>; }
Debug
Known issues
gotchaRequires react-native-sqlite-storage to be installed and linked.
fix
npm install react-native-sqlite-storage && cd ios && pod install
affects: >=0.0.0
deprecatedThe package is in active development; APIs may change between minor versions.
fix
Pin to exact version in package.json
affects: <1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'cojson-storage-rn-sqlite'
Package not installed or import path incorrect
fix
npm install cojson-storage-rn-sqlite
TypeError: db.transaction is not a function
Passed incorrect database object; must be from react-native-sqlite-storage
fix
Ensure db is obtained from useSQLiteDatabase() hook or openDatabase() call
Upgrade
Version history
0.12.1latest on npm
Audit
Dependencies
cojson-storage-sqliterequiredCore storage implementation for SQLite (platform-agnostic)
react-native-sqlite-storagerequiredReact Native SQLite binding
Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
cojson-storage-rn-sqlite — npm install cojson-storage-rn-sqlite · libregistry