{"id":18608801,"url":"https://github.com/itsmepetrov/redux-entities","last_synced_at":"2025-04-10T22:30:53.956Z","repository":{"id":57350624,"uuid":"45098220","full_name":"itsmepetrov/redux-entities","owner":"itsmepetrov","description":"Higher-order reducer for store entities received from normalizr and makes it easy to handle them.","archived":false,"fork":false,"pushed_at":"2017-11-17T14:31:40.000Z","size":7,"stargazers_count":33,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T05:41:32.722Z","etag":null,"topics":["normalizr","reducer","reducers","redux","redux-entities"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsmepetrov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-28T08:18:53.000Z","updated_at":"2023-03-12T12:13:30.000Z","dependencies_parsed_at":"2022-09-15T02:01:17.061Z","dependency_job_id":null,"html_url":"https://github.com/itsmepetrov/redux-entities","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmepetrov%2Fredux-entities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmepetrov%2Fredux-entities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmepetrov%2Fredux-entities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsmepetrov%2Fredux-entities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsmepetrov","download_url":"https://codeload.github.com/itsmepetrov/redux-entities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290464,"owners_count":21078992,"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":["normalizr","reducer","reducers","redux","redux-entities"],"created_at":"2024-11-07T03:04:21.840Z","updated_at":"2025-04-10T22:30:53.666Z","avatar_url":"https://github.com/itsmepetrov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redux Entities\n\n[![build status](https://img.shields.io/travis/itsmepetrov/redux-entities/master.svg?style=flat-square)](https://travis-ci.org/itsmepetrov/redux-entities)\n[![npm version](https://img.shields.io/npm/v/redux-entities.svg?style=flat-square)](https://www.npmjs.com/package/redux-entities)\n\nHigher-order reducer for store entities received from [normalizr](https://github.com/paularmstrong/normalizr) and makes it easy to handle them.\n\n### Installation\n\n```\nnpm install --save redux-entities\n```\n\n## Usage\n\n### Use with `entitiesReducer`\n\n```js\nimport { combineReducers } from 'redux';\nimport { entitiesReducer } from 'redux-entities';\nimport { merge, omit } from 'lodash';\n\nfunction contacts(state = {}, action) {\n  const { type, payload } = action;\n\n  switch (type) {\n\n  case UPDATE_CONTACT:\n  case REMOVE_CONTACT:\n    return merge({}, state, { [payload.id]: {\n      ...state[payload.id],\n      isPending: true\n    }});\n\n  case UPDATE_CONTACT_SUCCESS:\n    return merge({}, state, { [payload.id]: {\n      ...state[payload.id],\n      isPending: false\n    }});\n\n  case REMOVE_CONTACT_SUCCESS:\n    return omit(state, meta.id);\n\n  default:\n    return state;\n  }\n}\n\nexport default combineReducers({\n  contacts: entitiesReducer(contacts, 'contacts')\n});\n\n```\n\n### Use with `combineEntitiesReducers`\n\n```js\nimport { combineEntitiesReducers } from 'redux-entities';\nimport { contacts, groups, images, notes } from './entities';\n\nexport default combineEntitiesReducers({\n  contacts,\n  groups,\n  images,\n  notes\n});\n\n```\n\n## Immutable\n\nIf you want to use `Immutable` with `Redux` please check out this version of the library: [redux-entities-immutable](https://github.com/beautyfree/redux-entities-immutable)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmepetrov%2Fredux-entities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsmepetrov%2Fredux-entities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsmepetrov%2Fredux-entities/lists"}