{"id":19412994,"url":"https://github.com/dielduarte/redux-actiontypes-namespace","last_synced_at":"2025-04-24T11:31:34.859Z","repository":{"id":32441102,"uuid":"133987562","full_name":"dielduarte/redux-actionTypes-namespace","owner":"dielduarte","description":"add name spaces to your global actionTypes in an easy way","archived":false,"fork":false,"pushed_at":"2022-12-09T08:37:52.000Z","size":394,"stargazers_count":4,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-12T06:25:06.990Z","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/dielduarte.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":"2018-05-18T17:57:32.000Z","updated_at":"2023-03-08T04:33:10.000Z","dependencies_parsed_at":"2023-01-14T21:15:20.211Z","dependency_job_id":null,"html_url":"https://github.com/dielduarte/redux-actionTypes-namespace","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/dielduarte%2Fredux-actionTypes-namespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fredux-actionTypes-namespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fredux-actionTypes-namespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fredux-actionTypes-namespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dielduarte","download_url":"https://codeload.github.com/dielduarte/redux-actionTypes-namespace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952277,"owners_count":17230849,"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-10T12:29:53.531Z","updated_at":"2024-11-10T12:29:54.045Z","avatar_url":"https://github.com/dielduarte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redux-actiontypes-namespace\nAdd nameSpaces to your global actionTypes in an easy way\n\n## How to use \n\nFirst install\n\n```js\nyarn add redux-actiontypes-namespace\n```\n\nimport `createActionTypes` function, example:\n\n```js\nimport createActionTypes from 'redux-actiontypes-namespace';\n\nconst actionTypes = [\n  {\n    nameSpace: 'nameSpace1',\n    types: [\n      'TYPE_NAME',\n      'ANOTHER_TYPE'\n    ]\n  },\n  {\n    nameSpace: 'nameSpace2',\n    types: [\n      'SECOND_TYPE_NAME',\n      'SECOND_ANOTHER_TYPE'\n    ]\n  }\n];\n\nexport default createActionTypes(actionTypes);\n\n```\n\nnow your actionTypes shoud be like:\n\n```\n  {\n    TYPE_NAME: 'nameSpace1/TYPE_NAME',\n    ANOTHER_TYPE: 'nameSpace1/ANOTHER_TYPE',\n    SECOND_TYPE_NAME: 'nameSpace2/SECOND_TYPE_NAME',\n    SECOND_ANOTHER_TYPE: 'nameSpace2/SECOND_ANOTHER_TYPE'\n  }\n```\n\nSo, now just import your actionTypes and you can use in a normal way.\n\n```\n import types from 'where-your-file-was-created';\n\n dispatch({ type: types.TYPE_NAME })\n\n```\n\nor with object destructuring:\n\n```\n import { TYPE_NAME } from 'where-your-file-was-created';\n\n dispatch({ type: TYPE_NAME })\n\n```\n\nmade with \u003c3 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fredux-actiontypes-namespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdielduarte%2Fredux-actiontypes-namespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fredux-actiontypes-namespace/lists"}