{"id":13400875,"url":"https://github.com/jamesmacaulay/react-bacon","last_synced_at":"2025-03-16T18:31:40.361Z","repository":{"id":15237640,"uuid":"17966455","full_name":"jamesmacaulay/react-bacon","owner":"jamesmacaulay","description":"A little module for using React with Bacon.js","archived":false,"fork":false,"pushed_at":"2015-09-02T15:31:30.000Z","size":299,"stargazers_count":118,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-27T12:09:04.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesmacaulay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-21T02:59:43.000Z","updated_at":"2024-02-21T12:59:24.000Z","dependencies_parsed_at":"2022-08-04T02:45:21.251Z","dependency_job_id":null,"html_url":"https://github.com/jamesmacaulay/react-bacon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmacaulay%2Freact-bacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmacaulay%2Freact-bacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmacaulay%2Freact-bacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesmacaulay%2Freact-bacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesmacaulay","download_url":"https://codeload.github.com/jamesmacaulay/react-bacon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826788,"owners_count":20354220,"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":[],"created_at":"2024-07-30T19:00:56.568Z","updated_at":"2025-03-16T18:31:39.703Z","avatar_url":"https://github.com/jamesmacaulay.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized","Awesome React","React [🔝](#readme)"],"sub_categories":["Uncategorized","Tools"],"readme":"### _This project is no longer maintained_\n\nIt probably still works, but maybe not for long with the latest versions of React and/or Bacon.js. It's not a lot of code, so I encourage you to fork the project and turn it into exactly what you need.\n\nIf you'd like to take over maintenance of this project, feel free to get in touch either over [twitter](https://twitter.com/jamesmacaulay) or by [opening an issue](https://github.com/jamesmacaulay/react-bacon/issues/new).\n\n# react-bacon\n\nA little module for using [React](http://facebook.github.io/) with [Bacon.js](http://baconjs.github.io/).\n\nHere's [a JSFiddle](http://jsfiddle.net/jamesmacaulay/Wc7bb/)!\n\n## Installation\n\nFor [browserify](http://browserify.org/) projects, `npm install --save react-bacon`.\n\nFor other projects, use the [UMD](https://github.com/umdjs/umd) distribution in [/dist/react-bacon.js](https://raw.githubusercontent.com/jamesmacaulay/react-bacon/master/dist/react-bacon.js).\n\nIf you are just putting it in a `\u003cscript\u003e` tag, the library will be at `window.ReactBacon`.\n\n## Usage\n\nRight now the library includes a single React mixin, `BaconMixin`.\n\n`BaconMixin` provides a few different methods for your components:\n\n### component.propsProperty(_[propName]_)\n\nReturns a memoized `Bacon.Property` backed by the component's props, skipping duplicate values. When a `propName` is present, the values of the property are those of the given prop. If no `propName` is given, the property's values are the whole props objects of the component.\n\nThe properties returned are cleaned up with a `Bacon.End` when the component unmounts.\n\n### component.stateProperty(_[stateName]_)\n\nLike `propsProperty(propName)`, but for state values.\n\n### component.eventStream(functionName)\n\nRegisters an event handler function on the component with the given name, which simply sends its argument to the returned Bacon stream.\n\nThe stream is memoized by the `functionName`, and gets cleaned up with a `Bacon.End` when the component unmounts.\n\n### component.plug(observable, _[stateKey]_)\n\nPlugs a Bacon observable into the component's state, and returns an unsubscribe function. If a `stateKey` is given, then values from the observable are assigned to the given key. If no `stateKey` is given, the values must be objects which are passed directly to `setState` to assign multiple state keys at once.\n\nThe component will unsubscribe from the stream when it unmounts.\n\n## Packaging\n\n```\nbrowserify --standalone ReactBacon src/react-bacon.js -o dist/react-bacon.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesmacaulay%2Freact-bacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesmacaulay%2Freact-bacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesmacaulay%2Freact-bacon/lists"}