{"id":26476876,"url":"https://github.com/egodact/react-inject-firebase-data","last_synced_at":"2026-05-05T13:40:24.361Z","repository":{"id":94406242,"uuid":"126621347","full_name":"egodact/react-inject-firebase-data","owner":"egodact","description":"React component that injects Firebase data","archived":false,"fork":false,"pushed_at":"2018-12-09T14:09:39.000Z","size":123,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T13:08:42.921Z","etag":null,"topics":["firebase","firebase-database","inject-firebase","react","react-component"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egodact.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-24T17:04:01.000Z","updated_at":"2018-12-09T14:09:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"64f22653-5114-4759-a3ff-ba6dd054a0ba","html_url":"https://github.com/egodact/react-inject-firebase-data","commit_stats":null,"previous_names":["rafaelklaessen/react-inject-firebase-data"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egodact%2Freact-inject-firebase-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egodact%2Freact-inject-firebase-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egodact%2Freact-inject-firebase-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egodact%2Freact-inject-firebase-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egodact","download_url":"https://codeload.github.com/egodact/react-inject-firebase-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244227471,"owners_count":20419254,"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","firebase-database","inject-firebase","react","react-component"],"created_at":"2025-03-20T00:08:26.844Z","updated_at":"2026-04-12T13:50:19.509Z","avatar_url":"https://github.com/egodact.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-inject-firebase-data\nReact component that injects real-time Firebase data.\n\n![Demo screenshot](https://github.com/rafaelklaessen/react-inject-firebase-data/raw/master/screenshots/screenshot.png \"Screenshot of the demo\")\n\n## Install\n`yarn add react-inject-firebase-data` or `npm install --save react-inject-firebase-data`\n\n## Usage\nSee the [demo](https://github.com/rafaelklaessen/react-inject-firebase-data/tree/master/demo/src) for full examples.\n\n### With a function as children\n```javascript\nimport * as firebase from 'firebase';\nimport InjectFirebaseData from 'react-inject-firebase-data';\n\nconst App = () =\u003e (\n  \u003cInjectFirebaseData firebaseRef={firebase.database().ref().child('foo')}\u003e\n    {({ data }) =\u003e \u003cpre\u003e{data}\u003c/pre\u003e}\n  \u003c/InjectFirebaseData\u003e\n);\n```\n\n### With the Higher-Order Component\n```javascript\nimport * as firebase from 'firebase';\nimport { InjectFirebaseDataHOC } from 'react-inject-firebase-data';\n\nconst App = ({ data }) =\u003e \u003cpre\u003e{data}\u003c/pre\u003e;\n\nexport default InjectFirebaseDataHOC(\n  firebase.database().ref().child('foo')\n)(App);\n```\n\n## Props\n`*` = required\n\nProp | Description | Type | Default\n---- | ----------- | ---- | -------\n`firebaseRef*` | The Firebase database reference from which the value should be received | `object` |\n`renderWhileLoading` | When `true`, the children function gets called before the data is loaded | `bool` | `false`\n`children*` | The children function | `func` |\n\n### Props with the Higher-Order Component\nSignature:\n\n`InjectFirebaseDataHOC(firebaseRef: firebase.database.Reference, renderWhileLoading: bool) =\u003e (WrappedComponent: React.Component) =\u003e React.Component`\n\nFor parameter explanation, see the props table.\n\n### Parameters passed to the `children` function or the WrappedComponent\nThe `children` function receives an object as its argument, which contains the following keys:\n\nKey | Description | Type\n--- | ----------- | ----\n`data` | The retrieved Firebase data | `any`\n`dataKey` | The key of the retrieved data | `string`\n`loading` | `true` when the Firebase data has not yet been received. Only gets passed when the `renderWhileLoading` prop is set to `true` | `bool`\n\nFor the Higher-Order Component, this object becomes the wrapped component's props.\n\n## Development\n### Installation\n`yarn install` or `npm install`\n\n### Run demo\n`yarn start` or `npm start`\n\n### Run tests\n`yarn test` or `npm test`\n\n#### Building\n`yarn build` or `npm run build` will build the component for publishing to npm and also bundle the demo app.\n\n`yarn clean` or `npm run clean` will delete built resources.\n\nNotice that you'll need to temporarily delete `.babelrc` to be able to build the component (just put it back after you're done building).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegodact%2Freact-inject-firebase-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegodact%2Freact-inject-firebase-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegodact%2Freact-inject-firebase-data/lists"}