RefirebaseRefirebase

RefirebaseNative

The React Native / Expo variant of Refirebase.

Usage

RefirebaseNative is a drop-in replacement for mobile projects. Under the hood, Metro resolves standard refirebase imports to use this bundle, making it virtually transparent.

firebase.ts
// config/firebase.ts
import { RefirebaseNative } from 'refirebase/native';

export const { db, auth } = new RefirebaseNative({
  apiKey: "...",
  // ...
});

Key Differences

The main differences compared to the web SDK are:

  • auth uses signInWithCredential rather than popup methods (which don't work in React Native).

  • db.storage.upload accepts a Blob. Use the uriToBlob helper exported from refirebase/native to convert Expo/RN file URIs to Blobs before uploading.