{"id":26762299,"url":"https://github.com/richardcrng/redux-leaves","last_synced_at":"2025-04-15T09:27:17.476Z","repository":{"id":34614721,"uuid":"179556704","full_name":"richardcrng/redux-leaves","owner":"richardcrng","description":"Write once. Reduce anywhere.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:44:49.000Z","size":18683,"stargazers_count":50,"open_issues_count":37,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T18:51:39.814Z","etag":null,"topics":["javascript","reducer","redux","state-management","state-tree"],"latest_commit_sha":null,"homepage":"https://redux-leaves.js.org","language":"TypeScript","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/richardcrng.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}},"created_at":"2019-04-04T18:46:32.000Z","updated_at":"2024-01-30T05:41:13.000Z","dependencies_parsed_at":"2023-01-15T08:15:15.915Z","dependency_job_id":null,"html_url":"https://github.com/richardcrng/redux-leaves","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardcrng%2Fredux-leaves","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardcrng%2Fredux-leaves/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardcrng%2Fredux-leaves/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardcrng%2Fredux-leaves/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardcrng","download_url":"https://codeload.github.com/richardcrng/redux-leaves/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249042115,"owners_count":21203218,"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":["javascript","reducer","redux","state-management","state-tree"],"created_at":"2025-03-28T18:36:59.201Z","updated_at":"2025-04-15T09:27:17.449Z","avatar_url":"https://github.com/richardcrng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redux Leaves\n\nWrite once. Reduce anywhere.\n\n![Travis (.org)](https://img.shields.io/travis/richardcrng/redux-leaves.svg)\n[![Coverage Status](https://coveralls.io/repos/github/richardcrng/redux-leaves/badge.svg?branch=buttons)](https://coveralls.io/github/richardcrng/redux-leaves?branch=buttons)\n[![bundle size](https://badgen.net/bundlephobia/min/redux-leaves)](https://badgen.net/bundlephobia/min/redux-leaves)\n[![npm version](https://badge.fury.io/js/redux-leaves.svg)](https://badge.fury.io/js/redux-leaves)\n\n## Example\n\n```js\nimport { createStore } from 'redux'\nimport reduxLeaves, { bundle } from 'redux-leaves'\n\n// set up with initial state\nconst initialState = {\n  counter: 0,\n  list: [],\n  props: {}\n}\n\nconst [reducer, actions] = reduxLeaves(initialState)\nconst store = createStore(reducer)\n\n// setup complete! Now dispatch actions to your heart's content\n\nconsole.log(store.getState())\n// =\u003e { counter: 0, list: [], props: {} } \n\nstore.dispatch(actions.counter.create.increment(10))\nconsole.log(store.getState())\n// =\u003e { counter: 10, list: [], props: {} }\n\nstore.dispatch(actions.list.create.push('foo'))\nconsole.log(store.getState())\n// =\u003e { counter: 10, list: ['foo'], props: {} }\n\nconst compoundAction = bundle([\n  actions.counter.create.reset(),\n  actions.list[0].create.concat('bar'),\n  actions.props.at.arbitrary.path.create.update('here I am!')\n])\n\nstore.dispatch(compoundAction)\nconsole.log(store.getState())\n/*\n  =\u003e {\n    counter: 0,\n    list: ['foobar'],\n    props: { at: { arbitrary: { path: 'here I am!' } } }\n  }\n*/\n```\n\n## Documentation\n```bash\nnpm install --save redux-leaves\n```\n\n[Main documentation website](https://redux-leaves.js.org)\n\n### Getting started\n- [Overview](https://redux-leaves.js.org/docs/intro/overview)\n- [30 second demo](https://runkit.com/richardcrng/redux-leaves-playground/)\n\n### API reference\n- [Core: `reduxLeaves(initialState, reducers)`](https://redux-leaves.js.org/docs/redux-leaves)\n\n### Testing\n\nTo run all tests locally:\n\n```bash\ngit clone git@github.com:richardcrng/redux-leaves.git\ncd redux-leaves \u0026\u0026 npm run test a\n```\n\nMost tests are located alongside their relevant API documentation in the [docs](/docs) folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardcrng%2Fredux-leaves","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardcrng%2Fredux-leaves","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardcrng%2Fredux-leaves/lists"}