Firebase Hooksv0.2.0

Core

What every service shares — the result shape, error formatting, and the types behind both.

Core is the service-agnostic layer. Nothing here is specific to Auth, and nothing service-specific is ever added to it — so when Firestore and Storage land, they return the same result shape and format errors the same way.

import {
  formatFirebaseError,
  getFirebaseErrorCode,
  type HookResult,
} from '@timonwa/firebase-hooks';

Note the import path: the root entry, not /auth. Anything shared lives here; anything belonging to one service ships with that service's import.

One thing that isn't here: the error message catalogues. AUTH_ERROR_MESSAGES ships with /auth, and each future service brings its own, so an app importing only Auth never carries Firestore's copy.