{"id":18799559,"url":"https://github.com/l2silver/react-redux-blackbox","last_synced_at":"2026-01-02T20:30:16.757Z","repository":{"id":57343227,"uuid":"67894461","full_name":"l2silver/react-redux-blackbox","owner":"l2silver","description":"Unofficial react to redux bindings","archived":false,"fork":false,"pushed_at":"2016-09-14T04:02:34.000Z","size":389,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T04:08:11.917Z","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/l2silver.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-10T21:06:28.000Z","updated_at":"2016-09-10T21:07:13.000Z","dependencies_parsed_at":"2022-09-16T03:01:19.058Z","dependency_job_id":null,"html_url":"https://github.com/l2silver/react-redux-blackbox","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/l2silver%2Freact-redux-blackbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Freact-redux-blackbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Freact-redux-blackbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Freact-redux-blackbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l2silver","download_url":"https://codeload.github.com/l2silver/react-redux-blackbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239727837,"owners_count":19687258,"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-11-07T22:15:45.725Z","updated_at":"2026-01-02T20:30:16.687Z","avatar_url":"https://github.com/l2silver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"React Redux Blackbox\n=========================\n\nUnofficial React bindings for [Redux](https://github.com/reactjs/redux).  \nA more functional approach, but not to be used without a thorough understanding of the official bindings, [react-redux](https://github.com/reactjs/react-redux).\n\n[![Build Status](https://travis-ci.org/l2silver/react-redux-blackbox.svg?branch=master)](https://travis-ci.org/l2silver/react-redux-blackbox)\n\n## Additional Resources\n[Functionally sexier unofficial react redux bindings: The Medium Article](https://medium.com/p/a94141ed00c7)  \n[TJs frontend-boilerplate with blackbox](https://github.com/l2silver/frontend-boilerplate-blackbox)\n\n## Installation\n\nReact Redux requires **React 0.14 or later.**\n\n```\nnpm install --save react-redux-blackbox\n```\n\n## The secret sauce\n\nProviders are the only component connected to the store. All connect mapStateToProps functions are sent to the Provider, and the resulting props are passed down through a blackbox object.\n\n## New connect implimentation\n\n```\nimport { filterConnect } from 'react-redux-blackbox'\n\nconst Wrapped = filterConnect(\n\t(state, props)=\u003e{...},\n\t(dispatch, props)=\u003e{...},\n\t(stateProps, dispatchProps, ownProps)=\u003e{...},\n\toptions\n)(Container)\n\nor\n\nconst Wrapped = filterConnect(\n\t[(state, resultProps)=\u003e{...}, props=\u003eresultProps],\n\t[(dispatch, resultProps)=\u003e{...}, props=\u003eresultProps],\n\t(stateProps, dispatchProps, ownProps)=\u003e{...}, \n\toptions\n)(Container)\n```\n\nI've added the extra props change check because with blackbox, mapStateToProps functions that rely on props will do a double calculation everytime the resultProps change. This way we avoid double calculations when the resultProps are shallow equal.\n\n```\nimport { Provider } from 'react-redux-blackbox'\n\nfunction ProviderContent(props){\n\t\u003cWrapped blackbox={props.blackbox} /\u003e\n}\n\n\u003cProvider store={store}\u003e\n\t\u003cProviderContent /\u003e\n\u003c/Provider\u003e\n```\n\nProvider passes its only child the blackbox object through props, and from their you pass the blackbox to all the filterConnect components","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Freact-redux-blackbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl2silver%2Freact-redux-blackbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Freact-redux-blackbox/lists"}