{"id":18799564,"url":"https://github.com/l2silver/redux-retype-actions","last_synced_at":"2026-01-02T20:30:15.645Z","repository":{"id":57351405,"uuid":"83558918","full_name":"l2silver/redux-retype-actions","owner":"l2silver","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-04T14:51:20.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T08:47:31.305Z","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-01T13:44:38.000Z","updated_at":"2017-03-01T14:30:11.000Z","dependencies_parsed_at":"2022-08-31T06:10:23.563Z","dependency_job_id":null,"html_url":"https://github.com/l2silver/redux-retype-actions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-retype-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-retype-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-retype-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l2silver%2Fredux-retype-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l2silver","download_url":"https://codeload.github.com/l2silver/redux-retype-actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239727876,"owners_count":19687261,"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.266Z","updated_at":"2026-01-02T20:30:15.615Z","avatar_url":"https://github.com/l2silver.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"redux-retype-actions\n=====================\n\nRename action types\n\n[![Build Status](https://travis-ci.org/l2silver/redux-retype-actions.svg?branch=master)](https://travis-ci.org/l2silver/redux-retype-actions)\n\n\n## Why\nIf you use redux-batched-actions with any kind of redux dev tools, the batched actions show up simply as BATCH_ACTION, which doesn't tell you a whole lot about the action. Now you can easily rename a batch action to something more useful. Although this tool works with any kind of action, I can't think of any other use cases outside of batched-actions\n\n```js\nnpm install --save redux-retype-actions\n```\n\n## Usage\n\n```js\nimport {createStore} from 'redux';\nimport {batchActions, enableBatching} from 'redux-batched-actions';\nimport {retypeAction, enableRetyping} from 'redux-retype-actions';\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(enableRetyping(enableBatching(reducer)), initialState)\nconst doMultipleThings = retypeAction('DO_MULTIPLE_THINGS', batchActions([doThing(), doOther()]))\nstore.dispatch(doMultipleThings)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Fredux-retype-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl2silver%2Fredux-retype-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl2silver%2Fredux-retype-actions/lists"}