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.
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-hooksMigration 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:
- Authentication Hooks
- Cloud Firestore Hooks
- Cloud Functions Hooks
- Cloud Messaging Hooks
- Cloud Storage Hooks
- Realtime Database Hooks
License
- See LICENSE