{"id":16865635,"url":"https://github.com/erikras/react-callbag-listener","last_synced_at":"2025-04-11T09:45:29.104Z","repository":{"id":70239907,"uuid":"131203090","full_name":"erikras/react-callbag-listener","owner":"erikras","description":"👂 A React render-prop component that listens to values emitted by callbags","archived":false,"fork":false,"pushed_at":"2018-04-28T13:52:35.000Z","size":536,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T06:41:41.268Z","etag":null,"topics":["callbag","callbags","observable","react","render-prop","render-props"],"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/erikras.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-04-26T19:45:27.000Z","updated_at":"2021-01-07T01:23:35.000Z","dependencies_parsed_at":"2023-04-15T01:24:59.744Z","dependency_job_id":null,"html_url":"https://github.com/erikras/react-callbag-listener","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikras%2Freact-callbag-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikras%2Freact-callbag-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikras%2Freact-callbag-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikras%2Freact-callbag-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikras","download_url":"https://codeload.github.com/erikras/react-callbag-listener/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248369541,"owners_count":21092612,"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":["callbag","callbags","observable","react","render-prop","render-props"],"created_at":"2024-10-13T14:47:56.277Z","updated_at":"2025-04-11T09:45:29.097Z","avatar_url":"https://github.com/erikras.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 👂 React Callbag Listener\n\n[![NPM Downloads](https://img.shields.io/npm/dm/react-callbag-listener.svg?style=flat)](https://www.npmjs.com/package/react-callbag-listener)\n[![Build Status](https://travis-ci.org/erikras/react-callbag-listener.svg?branch=master)](https://travis-ci.org/erikras/react-callbag-listener)\n[![codecov.io](https://codecov.io/gh/erikras/react-callbag-listener/branch/master/graph/badge.svg)](https://codecov.io/gh/erikras/react-callbag-listener)\n\n---\n\nSo you've seen the light and accepted [Callbags](https://github.com/callbag/callbag) as the future of reactive front-end development, but you need to update a React component every time a callbag emits a new value?\n\n👂 React Callbag Listener is the answer!\n\n---\n\n## Demo 👀\n\n[![Edit 👂 React Callbag Listener Demo](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/4y2z5j6v7)\n\n---\n\n## Installation\n\n```bash\nnpm install --save react-callbag-listener\n```\n\nor\n\n```bash\nyarn add react-callbag-listener\n```\n\n## How it works\n\nYou provide any number of callbags as props to 👂 React Callbag Listener, and the render function given as `children` will be rendered whenever any of them changes.\n\n```jsx\nimport CallbagListener from 'react-callbag-listener'\n\n...\n\n// foo$ and bar$ are callbag sources that will emit values\n\u003cCallbagListener foo={foo$} bar={bar$}\u003e\n  {({ foo, bar }) =\u003e (\n    \u003cdiv\u003e\n      \u003cdiv\u003eFoo value is: {foo}\u003c/div\u003e\n      \u003cdiv\u003eBar value is: {bar}\u003c/div\u003e\n    \u003c/div\u003e\n  )}\n\u003c/CallbagListener\u003e\n```\n\nThat's it. There are no other options or API to document. The object given to your render prop will have the same keys as you passed as callbag props.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikras%2Freact-callbag-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikras%2Freact-callbag-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikras%2Freact-callbag-listener/lists"}