RefirebaseRefirebase

Installation

Add refirebase to your project in one command.

Install the package

Install refirebase using your preferred package manager. It ships with the Firebase JS SDK as a direct dependency, so you do not need to install firebase separately.

terminal
# npm
npm install refirebase

# yarn
yarn add refirebase

# pnpm
pnpm add refirebase

# bun
bun add refirebase

Optional dependencies

The refirebase/react hooks require React 18+, and refirebase/admin requires firebase-admin which is a server-only optional peer dependency.

terminal
# For refirebase/react (optional — already included if you have react)
# react >= 18 is a peer dep

# For refirebase/admin (server only)
npm install firebase-admin
💡
For React Native / Expo projects the same imports work out of the box — no separate alias needed. Metro automatically resolves refirebase and refirebase/react to the native bundle via the react-native export condition.

TypeScript

Refirebase is written in TypeScript and ships type declarations. No @types/refirebase package is needed.

Minimum supported TypeScript version is 5.0. Node.js >=18 is required.