JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 167
  • Score
    100M100P100Q83580F
  • License Apache-2.0

React Hooks for Firebase

Package Exports

  • @kage1020/react-firebase-hooks
  • @kage1020/react-firebase-hooks/auth
  • @kage1020/react-firebase-hooks/database
  • @kage1020/react-firebase-hooks/firestore
  • @kage1020/react-firebase-hooks/functions
  • @kage1020/react-firebase-hooks/messaging
  • @kage1020/react-firebase-hooks/storage

Readme

@kage1020/react-firebase-hooks

A fork of react-firebase-hooks with updated bug fixes and dependencies.

A set of reusable React Hooks for Firebase.

npm version

Installation

This package requires React 16.8.0 or later and Firebase v9.0.0 or later.

# with npm
npm install --save @kage1020/react-firebase-hooks

# with yarn
yarn add @kage1020/react-firebase-hooks

# with pnpm
pnpm add @kage1020/react-firebase-hooks

Migration from react-firebase-hooks

This package is a drop-in replacement for react-firebase-hooks. Simply change your import:

// Before
import { useAuthState } from 'react-firebase-hooks/auth';
import { useCollection } from 'react-firebase-hooks/firestore';

// After
import { useAuthState } from '@kage1020/react-firebase-hooks/auth';
import { useCollection } from '@kage1020/react-firebase-hooks/firestore';

Why this fork?

This library maintains the same excellent React Hooks API for Firebase while bringing modern tooling benefits:

  • ๐Ÿ› Bug fixes and improvements over the original package
  • โšก Faster builds with Vite instead of Rollup
  • ๐Ÿงช Better DX with Vitest instead of Jest
  • ๐Ÿ“ฆ Improved bundling with optimized ESM/CJS outputs
  • ๐Ÿ”ง Latest dependencies for better security and performance

Documentation

The API remains identical to the original package:

License