Registry / testing / rozenite-sqlite

rozenite-sqlite

JSON →
library0.0.12jsnpmunverified

SQLighter is a Rozenite devtools plugin that adds a live SQLite explorer panel to React Native apps. Version 0.0.12 is the latest, with weekly releases. It allows browsing databases, inspecting tables, running SQL queries, and viewing row details. Key differentiator: library-agnostic - works with expo-sqlite, op-sqlite, react-native-quick-sqlite, or custom native modules. Ships TypeScript types, requires React Native and Rozenite devtools setup. Unlike alternatives, it integrates directly into the Rozenite debugging workflow, providing real-time database inspection without leaving the development environment.

npm install rozenite-sqlite
INSTALL
IMPORT
SIG · ROZENITE-SQLITE
R
rozenite-sqlite
testingjavascriptv0.0.12
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.

useRozeniteSQLite
✓ import { useRozeniteSQLite } from 'rozenite-sqlite/react-native'
✗ import useRozeniteSQLite from 'rozenite-sqlite'
Default export not available. Must import from 'rozenite-sqlite/react-native' subpath. Common mistake: importing from main package or using default import.
type PlugParams
✓ import type { PlugParams } from 'rozenite-sqlite/react-native'
Type-only import for TypeScript. Use `import type` to avoid runtime inclusion.

Basic setup with expo-sqlite using openDatabaseSync. Registers two databases with the SQLExecutor callback.

import * as SQLite from 'expo-sqlite'; import { useRozeniteSQLite } from 'rozenite-sqlite/react-native'; export default function App() { useRozeniteSQLite({ databases: ['app.db', 'cache.db'], sqlExecutor: async (dbName, query) => { const db = SQLite.openDatabaseSync(dbName); return db.getAllSync(query) as Record<string, unknown>[]; }, }); return null; }
Debug
Known issues
gotchauseRozeniteSQLite must be called inside a component rendered under the Rozenite devtools context. If called outside the Rozenite provider, the panel won't receive data.
fix
Ensure the component using useRozeniteSQLite is a descendant of Rozenite's DevtoolsProvider (or similar). Refer to Rozenite documentation for setup.
affects: >=0.0.1
gotchasqlExecutor callback must return a flat array of row objects (Record<string, unknown>[]). Nesting or returning null/undefined will cause the devtools panel to display empty or crash.
fix
Ensure your SQLite library's query method returns an array where each element is a plain object with string keys. Use type assertion if needed.
affects: >=0.0.1
gotchaDatabase names in the 'databases' array must match exactly the names used in the sqlExecutor callback (including file extension, e.g., 'app.db' not 'app'). Inconsistency will cause silent failures with no panel data.
fix
Use the same database name strings consistently. If using expo-sqlite's openDatabaseSync, the name parameter includes the .db extension.
affects: >=0.0.1
gotchaThe hook communicates over a bridge. If Rozenite devtools is not active, the hook will still run but the panel won't show. No error is thrown.
fix
Ensure Rozenite devtools is properly initialized and connected. Check Rozenite documentation for troubleshooting.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Database "app.db" not found
Database name mismatch between 'databases' array and sqlExecutor lookup logic, or database not opened before query.
fix
Ensure the database is opened and stored in a map accessible to sqlExecutor. Verify the database name string exactly matches (including .db extension).
TypeError: Cannot read properties of undefined (reading 'getAllSync')
sqlExecutor gives a null/undefined database object, or the SQLite library method is not correctly bound.
fix
Check that the database instance is correctly obtained in sqlExecutor. If using expo-sqlite, ensure openDatabaseSync returns a valid database object.
Upgrade
Version history
0.0.12latest on npm
Audit
Dependencies
reactrequiredPeer dependency - required for React hooks and components
react-nativerequiredPeer dependency - required for React Native environment
Agent activity
4 hits · last 30 days
node
4
Resources
rozenite-sqlite — npm install rozenite-sqlite · libregistry