{"id":13847110,"url":"https://github.com/arnelenero/simpler-state","last_synced_at":"2025-10-25T13:14:57.131Z","repository":{"id":40559080,"uuid":"345326532","full_name":"arnelenero/simpler-state","owner":"arnelenero","description":"The simplest app state management for React","archived":false,"fork":false,"pushed_at":"2024-09-01T05:11:54.000Z","size":1356,"stargazers_count":483,"open_issues_count":0,"forks_count":16,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-12T02:59:40.566Z","etag":null,"topics":["hooks","react","state"],"latest_commit_sha":null,"homepage":"https://simpler-state.js.org","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/arnelenero.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-07T11:17:31.000Z","updated_at":"2025-04-07T21:47:01.000Z","dependencies_parsed_at":"2024-01-15T20:47:36.370Z","dependency_job_id":"1d334c4d-239d-4176-8806-55099036d1c9","html_url":"https://github.com/arnelenero/simpler-state","commit_stats":{"total_commits":210,"total_committers":2,"mean_commits":105.0,"dds":0.004761904761904745,"last_synced_commit":"f3a1fed13dce91e4a73590f6b1ae38cfd6b79e32"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnelenero%2Fsimpler-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnelenero%2Fsimpler-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnelenero%2Fsimpler-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnelenero%2Fsimpler-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnelenero","download_url":"https://codeload.github.com/arnelenero/simpler-state/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394723,"owners_count":22063984,"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":["hooks","react","state"],"created_at":"2024-08-04T18:00:54.431Z","updated_at":"2025-10-25T13:14:57.037Z","avatar_url":"https://github.com/arnelenero.png","language":"JavaScript","readme":"# \u003cimg src=\"https://simpler-state.js.org/assets/simpler-state-logo.png\" alt=\"SimpleR State\" width=\"240\"/\u003e\n\n[![npm](https://img.shields.io/npm/v/simpler-state)](https://www.npmjs.com/package/simpler-state)\n[![build](https://img.shields.io/github/actions/workflow/status/arnelenero/simpler-state/main-ci.yml)](https://github.com/arnelenero/simpler-state/actions/workflows/main-ci.yml)\n[![coverage](https://img.shields.io/coverallsCoverage/github/arnelenero/simpler-state)](https://coveralls.io/github/arnelenero/simpler-state)\n[![license](https://img.shields.io/github/license/arnelenero/simpler-state)](https://opensource.org/licenses/MIT)\n\n**SimpleR State** is an ultra-lightweight library that provides the _simplest_ state management for React.\n\n- **Minimalist API**; no complicated concepts or boilerplate\n- Use **plain functions** to update state (including async)\n- Largely **unopinionated** with flexible syntax\n- Extremely **simple to unit test** state logic\n- Highly extensible with **plug-ins** (e.g. persistence, dev tools)\n- Full **TypeScript** support with uncomplicated types\n- Made specifically for React, and built on **React Hooks**\n- **Fully supports React 18 Concurrent Mode**\n- Multiple times **faster** than context/reducer solution\n- It's tiny, just **around 1 KB** (minified + gzipped)\n\nGet all these benefits with one dependency install:\n\n```\nnpm install simpler-state\n```\n\n## Two Easy Steps!\n\n**Step 1:** Create an entity (shared state) and actions (updater functions)\n\n```js\n// counter.js\n\nimport { entity } from 'simpler-state'\n\nexport const counter = entity(0)\n\nexport const reset = () =\u003e {\n  counter.set(0)\n}\n\nexport const increment = by =\u003e {\n  counter.set(value =\u003e value + by)\n  // --OR--\u003e  counter.set(counter.get() + by)\n}\n```\n\n**Step 2:** Use the entity in your components with hooks\n\n```jsx\nimport { counter, increment, reset } from 'counter'\n\nconst CounterView = () =\u003e {\n  const count = counter.use()\n  // --OR--\u003e  const count = useEntity(counter)\n\n  return (\n    \u003c\u003e\n      \u003cdiv\u003e{count}\u003c/div\u003e\n\n      \u003cbutton onClick={() =\u003e increment(1)}\u003e + \u003c/button\u003e\n      \u003cbutton onClick={reset}\u003e Reset \u003c/button\u003e\n    \u003c/\u003e\n  )\n}\n```\n\nIt's that simple! **But the library can do a lot more, so check out the docs website.**\n\n## Documentation\n\nLearn more about what you can do with SimpleR State at [simpler-state.js.org](https://simpler-state.js.org).\n\n## Feedback\n\n**If you like this library, the concept, and its simplicity, please give it a star ⭐️ on the [GitHub repo](https://github.com/arnelenero/simpler-state) to let me know.** 😀\n\nThe RFC (Request For Comments) has ended, but please feel free to open an issue on GitHub for any concerns/questions/suggestions.\n\n## Prior Art\n\nThis library is an evolution of the already production-proven [react-entities](https://github.com/arnelenero/react-entities) that I also wrote. It shares the same stable core, but with a very different API.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnelenero%2Fsimpler-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnelenero%2Fsimpler-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnelenero%2Fsimpler-state/lists"}