finds.dev← search

// the find

CSFrequency/react-firebase-hooks

★ 3,637 · TypeScript · Apache-2.0 · updated Apr 2024

React Hooks for Firebase.

React hooks for Firebase's main services — Auth, Firestore, Realtime Database, Storage, Functions, and Messaging. Wraps Firebase's subscription APIs into loading/value/error tuples so you don't write the same useEffect cleanup boilerplate everywhere. Aimed at React devs already committed to Firebase who want less setup code.

Covers all major Firebase surfaces in one package with a consistent API shape (value, loading, error). TypeScript-first with proper generic types so Firestore document hooks are actually typed to your data shape. The hooks correctly handle subscription cleanup on unmount — the boilerplate they replace is exactly the kind that causes memory leaks when written by hand. Cache-and-listen pattern in collection/document hooks means you get instant local data before the server round-trip.

Last push was April 2024, and Firebase itself moves fast — if Google ships a significant SDK change, this library will lag. React Native Firebase support was dropped in v5 with no clear plan, which cuts out a meaningful portion of the target audience. Test coverage is thin — one test file visible for the entire Firestore module. No support for Firebase's newer features like Data Connect or App Check hooks, so you'll be writing your own wrappers for those anyway.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →