{"id":19505897,"url":"https://github.com/morlay/redux-actions","last_synced_at":"2026-05-14T17:40:28.685Z","repository":{"id":57128111,"uuid":"64818239","full_name":"morlay/redux-actions","owner":"morlay","description":null,"archived":false,"fork":false,"pushed_at":"2016-12-08T08:08:56.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T17:17:15.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/morlay.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":"2016-08-03T05:41:11.000Z","updated_at":"2016-12-08T08:08:27.000Z","dependencies_parsed_at":"2022-08-31T18:23:22.662Z","dependency_job_id":null,"html_url":"https://github.com/morlay/redux-actions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fredux-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fredux-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fredux-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morlay%2Fredux-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morlay","download_url":"https://codeload.github.com/morlay/redux-actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240754364,"owners_count":19852189,"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-10T22:34:45.310Z","updated_at":"2026-05-14T17:40:23.632Z","avatar_url":"https://github.com/morlay.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux actions\n\nEnhancement for `redux-actions`\n\n[![Build Status](https://img.shields.io/travis/morlay/redux-actions.svg?style=flat-square)](https://travis-ci.org/morlay/redux-actions)\n[![NPM](https://img.shields.io/npm/v/@morlay/redux-actions.svg?style=flat-square)](https://npmjs.org/package/@morlay/redux-actions)\n[![Dependencies](https://img.shields.io/david/morlay/redux-actions.svg?style=flat-square)](https://david-dm.org/morlay/redux-actions)\n\n## APIs\n\n### `createAction(type, payloadCreator = Identity, ?metaCreator)`\n\nUsage like [`redux-actions#createAction`](https://github.com/acdlite/redux-actions#createactiontype-payloadcreator--identity-metacreator)\nbut will overwrite `.toString()` to the actionCreator, \n`toString()` will return actionType\n\n### `handleActions(reducerMap, ?defaultState)`\n\nUsage like [`redux-actions#handleActions`](https://github.com/acdlite/redux-actions#handleactionsreducermap-defaultstate),\nbut callback of handler will be `(state, payload, meta) =\u003e ()` instead of `(state, action)`\n\n### `buildCreateAction(actionStatusTypes): createAction`\n\nfor build multiple status action creator\n\n\n## Examples\n\n```js\nimport {\n  buildCreateAction,\n  createAction,\n  handleActions,\n} from '@morlay/redux-actions';\n\nconst createMultiAction = buildCreateAction({\n    success: (type) =\u003e `${type}_SUCCESS`,\n    failed: (type) =\u003e `${type}_FAILED`,\n});\n\nconst syncAction = createAction('syncAction');\nconst asyncAction = createMultiAction('asyncAction');\n\nconst reducer = handleActions({\n    [syncAction]: ({ counter }, payload) =\u003e ({\n        counter: payload,\n    }),\n    [asyncAction.success]: ({ counter }, payload) =\u003e ({\n        counter: counter + payload,\n    }),\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorlay%2Fredux-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorlay%2Fredux-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorlay%2Fredux-actions/lists"}