{"id":16811548,"url":"https://github.com/hannojg/react-native-firebase-hooks","last_synced_at":"2026-03-16T13:11:45.096Z","repository":{"id":41502924,"uuid":"436895365","full_name":"hannojg/react-native-firebase-hooks","owner":"hannojg","description":"React Hooks for React Native Firebase","archived":false,"fork":false,"pushed_at":"2022-07-04T11:12:34.000Z","size":989,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-24T21:21:36.639Z","etag":null,"topics":["firebase","hooks","react-native"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hannojg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-10T07:51:58.000Z","updated_at":"2024-04-24T21:21:36.640Z","dependencies_parsed_at":"2022-08-24T12:20:12.371Z","dependency_job_id":null,"html_url":"https://github.com/hannojg/react-native-firebase-hooks","commit_stats":null,"previous_names":["skillnation/react-native-firebase-hooks"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannojg%2Freact-native-firebase-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannojg%2Freact-native-firebase-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannojg%2Freact-native-firebase-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hannojg%2Freact-native-firebase-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hannojg","download_url":"https://codeload.github.com/hannojg/react-native-firebase-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245122775,"owners_count":20564370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","hooks","react-native"],"created_at":"2024-10-13T10:19:03.857Z","updated_at":"2026-03-16T13:11:44.988Z","avatar_url":"https://github.com/hannojg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔥⚓️ react-native-firebase-hooks\n\nReact Hooks for React Native Firebase\n\n## Installation\n\n```\nyarn add @skillnation/react-native-firebase-hooks\n```\n\n_Note:_ This assumes you have setup [react-native-firebase](https://rnfirebase.io/) in your project.\n\n## Usage\n\n\n### Example\n\n```tsx\nimport React from 'react';\nimport type { Product } from './types';\nimport firestore from '@react-native-firebase/firestore';\nimport { useCollectionData } from '@skillnation/react-native-firebase-hooks/firestore';\n\nexport const App: React.FC = () =\u003e {\n  const [products, isLoading, error] = useCollectionData(\n    firestore().collection\u003cProduct\u003e('products')\n  );\n\n  if (isLoading) return \u003cLoadingComponent /\u003e\n  if (error) return \u003cErrorComponent error={error} /\u003e\n  return \u003cProductList products={products} /\u003e;\n};\n\n```\n\n### Documentation\n\n⚠️ These doc links redirect to [`react-firebase-hooks`](https://github.com/CSFrequency/react-firebase-hooks).\n\nThe API is exactly the same as [`react-firebase-hooks`](https://github.com/CSFrequency/react-firebase-hooks).\nOnly the imports are different:\n\n```diff\n- import {} from 'react-firebase-hooks/MODULE_NAME'\n+ import {} from '@skillnation/react-native-firebase-hooks/MODULE_NAME'\n```\n\n- [Authentication Hooks](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2/auth)\n- [Cloud Firestore Hooks](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2/firestore)\n- [Cloud Functions Hooks](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2/functions)\n- [Cloud Messaging Hooks](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2/messaging)\n- [Cloud Storage Hooks](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2/storage)\n- [Realtime Database Hooks](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2/database)\n\n## Why use this instead of `react-firebase-hooks`?\n\n`react-firebase-hooks` is [incompatible](https://github.com/CSFrequency/react-firebase-hooks/issues/181#issue-1046383491) with the latest versions of [`react-native-firebase`](https://rnfirebase.io/), especially from a types perspective.\nThis library works internally mostly the same as react-firebase-hooks.\nSo you really only want to use this lib for react-native if you are using [`react-native-firebase`](https://rnfirebase.io/).\n\n## Migrating from `react-firebase-hooks`\n\nThe only thing you have to do is to change the imports:\n\n```diff\n- import {} from 'react-firebase-hooks/MODULE_NAME'\n+ import {} from '@skillnation/react-native-firebase-hooks/MODULE_NAME'\n```\n\nNote however, that this library is based on [`react-firebase-hooks` v4](https://github.com/CSFrequency/react-firebase-hooks/tree/v4.0.2), as this version was for the Firebase JS SDK v8, which had a very similar API to the native SDKs.\nWe **do** include features of newer versions of `react-firebase-hooks` (such as the `reload()` callback on `use*Once` hooks, which was added in v5).\n\nHowever, any change in newer version that is for compatibility with Firebase Js SDJ v9 won't be added to this library. This is due to the fact that the firebase JS SDK has a different API from the native SDKs, so we can't have 100% feature parity.\n\nAs an example [FirestoreDataConverter](https://firebase.google.com/docs/reference/js/firestore_.firestoredataconverter) is something that just exists in the Firebase v9 JS SDK, and can't be added here.\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhannojg%2Freact-native-firebase-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhannojg%2Freact-native-firebase-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhannojg%2Freact-native-firebase-hooks/lists"}