{"id":15866277,"url":"https://github.com/kanitsharma/react-deflux","last_synced_at":"2026-04-29T18:31:42.451Z","repository":{"id":140496719,"uuid":"127629492","full_name":"kanitsharma/react-deflux","owner":"kanitsharma","description":"Flux architecture implemented using react's new context API","archived":false,"fork":false,"pushed_at":"2018-04-29T22:35:36.000Z","size":278,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-17T15:43:06.242Z","etag":null,"topics":["flux","flux-architecture","react","react16"],"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/kanitsharma.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-01T12:58:31.000Z","updated_at":"2018-05-14T18:16:12.000Z","dependencies_parsed_at":"2024-07-09T00:30:51.171Z","dependency_job_id":null,"html_url":"https://github.com/kanitsharma/react-deflux","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kanitsharma/react-deflux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanitsharma%2Freact-deflux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanitsharma%2Freact-deflux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanitsharma%2Freact-deflux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanitsharma%2Freact-deflux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanitsharma","download_url":"https://codeload.github.com/kanitsharma/react-deflux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanitsharma%2Freact-deflux/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["flux","flux-architecture","react","react16"],"created_at":"2024-10-05T23:05:26.051Z","updated_at":"2026-04-29T18:31:42.429Z","avatar_url":"https://github.com/kanitsharma.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Deflux\n\nYet another flux implementation, with bindings for react.\nBuilt over react's new context API.\n\n## Getting Started\n\n```javascript\nnpm install --save react-deflux\n```\n\nWrap ReState over your root component.\n\n```javascript\n\nimport Provider from 'react-deflux';\n\n\u003cProvider\n  store={initialState} // initial state of your store\n  applyMiddleWare={fetchDataMiddleWare} // Optional, Allows managing side-effects\n\u003e\n  \u003cApp /\u003e\n\u003c/Provider\u003e\n\n```\n\nThat's it, now any child component can connect to store.\n\n```javascript\n\nimport { connect } from 'react-deflux';\n\nconst App = ({ buttonClick }) =\u003e (\n  \u003cdiv\u003e\n    \u003cbutton onClick={buttonClick} \u003e Fire Action! \u003c/button\u003e\n  \u003c/div\u003e\n);\n\nconst mapStateToProps = state =\u003e ({\n  ...state\n})\n\nconst mapDispatchToProps = (dispatch) =\u003e ({\n  buttonClick: _ =\u003e dispatch({ type: 'DUMMY_ACTION'})\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(App)\n\n```\n\n## Middleware\n\nThis the best part. You can pass any function (middleware) to the applyMiddleWare prop, and it will be fired with every action.\n\n```javascript\n\n// Handling async with middleware\n\nexport default state =\u003e action =\u003e dispatch =\u003e (\n  action.type === 'FETCH_DATA' \u0026\u0026\n    fetch('https://jsonplaceholder.typicode.com/posts/1')\n      .then(response =\u003e response.json())\n      .then(json =\u003e dispatch({ type: 'FETCHED_DATA', payload: { apiData: json } }))\n)\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanitsharma%2Freact-deflux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanitsharma%2Freact-deflux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanitsharma%2Freact-deflux/lists"}