{"id":19174410,"url":"https://github.com/talkingdata/rxloop","last_synced_at":"2025-10-03T15:15:59.409Z","repository":{"id":57139173,"uuid":"132127678","full_name":"TalkingData/rxloop","owner":"TalkingData","description":"rxloop = Redux + redux-observable (Inspired by dva)","archived":false,"fork":false,"pushed_at":"2019-10-25T19:13:18.000Z","size":1004,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-27T01:18:23.974Z","etag":null,"topics":["flux-architecture","redux","redux-observable","rx","rxjs","rxloop"],"latest_commit_sha":null,"homepage":"https://talkingdata.github.io/rxloop","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/TalkingData.png","metadata":{"files":{"readme":"README-en_US.md","changelog":"CHANGELOG.md","contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-04T10:46:54.000Z","updated_at":"2022-12-02T09:35:56.000Z","dependencies_parsed_at":"2022-09-03T13:53:52.850Z","dependency_job_id":null,"html_url":"https://github.com/TalkingData/rxloop","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TalkingData%2Frxloop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TalkingData%2Frxloop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TalkingData%2Frxloop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TalkingData%2Frxloop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TalkingData","download_url":"https://codeload.github.com/TalkingData/rxloop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931809,"owners_count":21827169,"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":["flux-architecture","redux","redux-observable","rx","rxjs","rxloop"],"created_at":"2024-11-09T10:17:43.755Z","updated_at":"2025-10-03T15:15:54.383Z","avatar_url":"https://github.com/TalkingData.png","language":"JavaScript","readme":"# rxloop\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/@rxloop/core.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@rxloop/core\n[download-image]: https://img.shields.io/npm/dm/@rxloop/core.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@rxloop/core\n\n[中文 README](README-zh_CN.md)\n\u003e rxloop = Redux + redux-observable.\n\nRxJS-based predictable state management container, ultra-lightweight \"Redux + redux-observable\" architecture.\n\n## Features\n* Facilitate the abstract front-end domain model, free choice of multi-state or single state tree;\n* Easy to learn and use: Only four apis, friendly to Redux and RxJS;\n* Isolation side effects: using the asynchronous processing capabilities of RxJS, free combination, cancel AJAX and other asynchronous calls in the Pipes;\n* Extensions RxJS: rxloop can be cascaded into RxJS data pipelines, eventually distributing multiple data pipes.\n\n## Installation\nVia npm:\n```bash\n$ npm install @rxloop/core\n```\n\nOr yarn\n```bash\n$ yarn add @rxloop/core\n```\n\nOr introduced through CDN\n```html\n\u003cscript src=\"https://unpkg.com/@rxloop/core@0.6.1/dist/rxloop.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/rxjs@6.2.0/bundles/rxjs.umd.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nvar app = rxloopCore();\napp.model({\n  name: 'user',\n  state: { name: 'wxnet' }\n});\n\u003c/script\u003e\n```\n\n## Hello rxloop\n```javascript\nimport rxloop from '@rxloop/core';\n\n// Create a globally unique app in one application\nconst app = rxloop();\n\n// In the application, \n// you can create multiple business models,\n// such as the following user and counter models\napp.model({\n  name: 'user',\n  state: { name: 'wxnet' }\n});\napp.model({\n  name: 'counter',\n  state: {\n    counter: 0,\n  },\n  reducers: {\n    inc(state) {\n      return {\n        ...state,\n        counter: state.counter + 1\n      };\n    },\n    dec(state) {\n      return {\n        ...state,\n        counter: state.counter - 1\n      };\n    },\n  },\n});\n\n// Subscribe to the status of the counter model at the View level,\n// When the model state changes,\n// use View layer framework-related methods to synchronize View updates,\n// such as React's setState method\napp.stream('counter').subscribe((state) =\u003e {\n  // this.setState(state);\n});\n\n// In the view layer,\n// you can dispatch an action via the dispatch method\n// Action updates the model state via pipes or reducers\napp.dispatch({\n  type: 'counter/inc',\n});\napp.dispatch({\n  type: 'counter/inc',\n});\napp.dispatch({\n  type: 'counter/dec',\n});\n```\n\nFor more features such as asynchronous requests, cancellation requests, etc.,\nyou can read through the documentation 👇.\n\n## Documentation\n\n1. [Quick start](https://talkingdata.github.io/rxloop/#/basics/getting-started)\n2. [Error handling](https://talkingdata.github.io/rxloop/#/basics/error-handler)\n3. [Integration with RxJS](https://talkingdata.github.io/rxloop/#/advanced/integration-with-rxjs)\n4. [Multi-state and single-state trees](https://talkingdata.github.io/rxloop/#/advanced/multi-state-and-single-state)\n\n## Examples\n\n1. [counter-basic](https://github.com/TalkingData/rxloop/tree/master/examples/counter-basic)\n2. [ajax-cancel](https://github.com/TalkingData/rxloop/tree/master/examples/ajax-cancel)\n3. [error-handler](https://github.com/TalkingData/rxloop/tree/master/examples/error-handler)\n4. [React todolist app with rxloop](https://github.com/TalkingData/rxloop-react-todos)\n\n## License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalkingdata%2Frxloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalkingdata%2Frxloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalkingdata%2Frxloop/lists"}