{"id":22726875,"url":"https://github.com/albertobasalo/reactor","last_synced_at":"2026-04-16T18:02:41.033Z","repository":{"id":57099536,"uuid":"354005220","full_name":"AlbertoBasalo/reactor","owner":"AlbertoBasalo","description":"RxJs store, based on Redux but way more simple.","archived":false,"fork":false,"pushed_at":"2021-04-29T08:10:05.000Z","size":1450,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-16T12:21:12.923Z","etag":null,"topics":["redux","rxjs","rxjs-store","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/AlbertoBasalo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-04-02T11:57:36.000Z","updated_at":"2022-09-08T11:50:36.000Z","dependencies_parsed_at":"2022-08-20T17:30:45.487Z","dependency_job_id":null,"html_url":"https://github.com/AlbertoBasalo/reactor","commit_stats":null,"previous_names":["atomicbuilders/reactor"],"tags_count":13,"template":false,"template_full_name":"AlbertoBasalo/quark","purl":"pkg:github/AlbertoBasalo/reactor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoBasalo%2Freactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoBasalo%2Freactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoBasalo%2Freactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoBasalo%2Freactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlbertoBasalo","download_url":"https://codeload.github.com/AlbertoBasalo/reactor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlbertoBasalo%2Freactor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31897870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T17:33:00.867Z","status":"ssl_error","status_checked_at":"2026-04-16T17:32:57.401Z","response_time":69,"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":["redux","rxjs","rxjs-store","typescript"],"created_at":"2024-12-10T17:07:17.581Z","updated_at":"2026-04-16T18:02:40.969Z","avatar_url":"https://github.com/AlbertoBasalo.png","language":"TypeScript","readme":"\u003e ⚠ Right now the deployed version at NPM only works with node projects. Browser version is comming soon.\n\n[![npm (scoped)](https://img.shields.io/npm/v/@atomic.builders/reactor)](https://www.npmjs.com/package/@atomic-builders/reactor)\n\n# ☢ Reactor\n\n## Reactive-store\n\nBasic _minimalistic REDUX_ made with RxJs\n\n\u003e Production ready **observable state management**\n\n## 🎯 Motivation\n\n✅ Avoid the use of heavy and complex libraries like _NgRX_\n\n✅ Less than 100 lines [store.ts](https://github.com/AtomicBuilders/reactor/blob/master/src/store.ts)\n\n## Installation\n\n```bash\nnpm i @atomic.builders/reactor\n```\n\n## ✨ Sample use\n\n```typescript\nconst initialBasket: Basket = { client: '', items: [], status: '' };\nconst basket$ = new Store\u003cBasket\u003e(initialBasket);\n\n// BASIC USAGE\n// get snapshot\nconst currentBasket: Basket = basket$.getState();\nconsole.log(currentBasket);\n// observe changes\nbasket$.getState$().subscribe({\n  next: basket =\u003e console.log({ basket }),\n});\n// observe selected changes\nbasket$\n  .select$(basket =\u003e basket.status)\n  .subscribe({\n    next: status =\u003e console.log({ status }),\n  });\n// setting direct state\nbasket$.setState({ client: '', items: [], status: 'EMPTY' });\n\n// WHITH ACTIONS\n// observe actions\nbasket$.getActions$().subscribe({\n  next: action =\u003e console.log({ action }),\n});\n// dispatch simple action\nconst setClientAction: Action\u003cBasket\u003e = new Action\u003cBasket\u003e('SET_CLIENT', {\n  client: 'John Doe',\n  status: 'EMPTY',\n});\nbasket$.dispatch(setClientAction);\n\n// WITH A REDUCER\n// dispatch action with payload and reducer\nconst itemPayload: Item = {\n  name: 'An ACME thing',\n  units: 19,\n  unitPrice: 71,\n};\nconst addItemReducer = (basket: Basket, payload: unknown) =\u003e {\n  basket.items = [...basket.items, payload as Item];\n  basket.status = 'FILLED';\n  return basket;\n};\nconst addItemAction: Action\u003cBasket\u003e = new Action\u003cBasket\u003e('ADD_ITEM', itemPayload, addItemReducer);\nbasket$.dispatch(addItemAction);\n```\n\n## ⚙ Workflows\n\n### 👨‍💻 Dev Workflow\n\nWhile developing, make sure to install the recommended extensions for a better dev experience.\n\nRun `npm run test:watch` it will run test after each change. Ideal for TDD or testing just in time.\n\nRun `npm run test` it will run all test once and stops. Default for CI/CD most common environments.\n\nIf you want also the coverage report then use `npm run test:coverage` .\n\n## 🛠 Tools\n\n### 📦 Commits and release\n\n- Use [standard-version](https://www.npmjs.com/package/standard-version) to produce a changelog file from [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)\n\n### 💅 Code style with Prettier\n\n- Installed and configured prettier\n\n\u003e Recommended [prettier extension](https://github.com/prettier/prettier-vscode)\n\n### 📐 Code linting with esLint\n\n- Installed and configured eslint to work with prettier\n\n\u003e Recommended [esLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n\n### 🧪 Code tested with Jest\n\n- Installed and configured **jest** to run specs\n- Configured to conform with **eslint**\n- Uses `ts-jest` to work natively with **TypeScript**\n\n## 👨 Created by Alberto Basalo\n\n\u003e [@albertobasalo](https://twitter.com/albertobasalo)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertobasalo%2Freactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertobasalo%2Freactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertobasalo%2Freactor/lists"}