{"id":18799563,"url":"https://github.com/l2silver/redux-compose-hors","last_synced_at":"2025-07-05T07:06:32.206Z","repository":{"id":57350458,"uuid":"84150445","full_name":"l2silver/redux-compose-hors","owner":"l2silver","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-07T04:08:50.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T19:53:44.646Z","etag":null,"topics":[],"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/l2silver.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":"2017-03-07T03:31:22.000Z","updated_at":"2017-03-07T03:50:51.000Z","dependencies_parsed_at":"2022-09-16T21:21:35.461Z","dependency_job_id":null,"html_url":"https://github.com/l2silver/redux-compose-hors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/l2silver/redux-compose-hors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-compose-hors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-compose-hors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-compose-hors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-compose-hors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l2silver","download_url":"https://codeload.github.com/l2silver/redux-compose-hors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-compose-hors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261229433,"owners_count":23127608,"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":[],"created_at":"2024-11-07T22:15:46.254Z","updated_at":"2025-07-05T07:06:32.184Z","avatar_url":"https://github.com/l2silver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"redux-compose-hors\n=====================\n\nCompose higher order reducers\n\n[![Build Status](https://travis-ci.org/l2silver/redux-compose-hors.svg?branch=master)](https://travis-ci.org/l2silver/redux-compose-hors)\n\n## Why\nIf you use two or more higher order reducers, then the actions of those reducers must follow the same order that the higher order reducers are in. Furthermore, those reducers cannot be nested beyond two degrees.\n\n```\nnpm install --save redux-compose-hors\n```\n\n## Usage\n\n```\nimport {createStore} from 'redux';\nimport {batchActions, enableBatching} from 'redux-batched-actions';\nimport {retypeAction, enableRetyping} from 'redux-retype-actions';\nimport composeHors from 'redux-compose-hors';\nimport {createAction} from 'redux-actions';\n\nconst doThing = createAction('DO_THING')\nconst doOther = createAction('DO_OTHER')\n\nfunction reducer(state, action) {\n  switch (action.type) {\n    case 'DO_THING': return 'thing'\n    case 'DO_OTHER': return 'other'\n    default: return state\n  }\n}\n\nconst store = createStore(composeHors(reducer, enableRetyping, enableBatching), initialState)\nconst doMultipleThings = retypeAction('DO_MULTIPLE_THINGS', batchActions([doThing(), doOther()]))\nconst doMultipleThingsTwice = batchActions([doMultipleThings, doMultipleThings])\nstore.dispatch(doMultipleThingsTwice)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Fredux-compose-hors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl2silver%2Fredux-compose-hors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Fredux-compose-hors/lists"}