{"id":17772606,"url":"https://github.com/jamesplease/redux-resource-3.0-docs","last_synced_at":"2026-01-11T01:51:44.145Z","repository":{"id":66133899,"uuid":"123162091","full_name":"jamesplease/redux-resource-3.0-docs","owner":"jamesplease","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-27T17:40:42.000Z","size":1231,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"gh-pages","last_synced_at":"2025-02-07T09:41:57.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jamesplease.github.io/redux-resource-3.0-docs/","language":"HTML","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/jamesplease.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-27T17:12:15.000Z","updated_at":"2018-02-27T17:41:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"44dc6e20-eeb4-45d5-9f73-c8fc53df6dc5","html_url":"https://github.com/jamesplease/redux-resource-3.0-docs","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/jamesplease%2Fredux-resource-3.0-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesplease%2Fredux-resource-3.0-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesplease%2Fredux-resource-3.0-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesplease%2Fredux-resource-3.0-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesplease","download_url":"https://codeload.github.com/jamesplease/redux-resource-3.0-docs/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246660081,"owners_count":20813338,"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-10-26T21:39:59.571Z","updated_at":"2026-01-11T01:51:44.117Z","avatar_url":"https://github.com/jamesplease.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"http://redux-resource.js.org\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/2322305/35489731-63e3bb20-044e-11e8-8211-b7d153722865.png\" height=\"120\" alt=\"Redux Resource Logo\" aria-label=\"redux-resource.js.org\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gitter.im/jmeas/redux-resource?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\"\u003e\n    \u003cimg src=\"https://badges.gitter.im/jmeas/redux-resource.svg\" alt=\"Redux Resource on Gitter\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/jamesplease/redux-resource\"\u003e\n    \u003cimg src=\"http://img.shields.io/travis/jamesplease/redux-resource.svg?style=flat\" alt=\"Redux Resource Travis Builds\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/redux-resource\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/redux-resource.svg\" alt=\"Redux Resource NPM Package\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/jamesplease/redux-resource?branch=master\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/jamesplease/redux-resource/badge.svg?branch=master\" alt=\"Redux Resource Code Coverage\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/redux-resource/dist/redux-resource.min.js\"\u003e\n    \u003cimg src=\"http://img.badgesize.io/https://unpkg.com/redux-resource/dist/redux-resource.min.js?compression=gzip\" alt=\"Redux Resource gzip Size\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nA tiny but powerful system for managing 'resources': data that is persisted to\nremote servers.\n\n✓ Removes nearly all boilerplate code for remotely-stored data  \n✓ Incrementally adoptable  \n✓ Encourages best practices like [normalized state](http://redux.js.org/docs/recipes/reducers/NormalizingStateShape.html)  \n✓ Works well with APIs that adhere to standardized formats, such as JSON API  \n✓ Works well with APIs that don't adhere to standardized formats, too  \n✓ Integrates well with your favorite technologies: HTTP, gRPC, normalizr, redux-observable, redux-saga, and more  \n✓ Microscopic file size (2kb gzipped!)\n\n### Installation\n\nTo install the latest version:\n\n```\nnpm install --save redux-resource\n```\n\n### Documentation\n\nView the documentation at\n**[redux-resource.js.org ⇗](https://redux-resource.js.org/)**.\n\n### Quick Start\n\nFollow this guide to get a taste of what it's like to work with Redux\nResource.\n\nFirst, we set up our store with a \"resource reducer,\" which is a reducer that\nmanages the state for one type of resource. In this guide, our reducer will\nhandle the data for our \"books\" resource.\n\n```js\nimport { createStore, combineReducers } from 'redux';\nimport { resourceReducer } from 'redux-resource';\n\nconst reducer = combineReducers({\n  books: resourceReducer('books')\n});\n\nconst store = createStore(reducer);\n```\n\nOnce we have a store, we can start dispatching actions to it. In this example,\nwe initiate a request to read a book with an ID of 24, then follow it up with an\naction representing success. There are two actions, because requests usually\noccur over a network, and therefore take time to complete.\n\n```js\nimport { actionTypes } from 'redux-resource';\nimport store from './store';\n\n// This action represents beginning the request to read a book with ID of 24. This\n// could represent the start of an HTTP request, for instance.\nstore.dispatch({\n  type: actionTypes.READ_RESOURCES_PENDING,\n  resourceType: 'books',\n  resources: [24]\n});\n\n// Later, when the request succeeds, we dispatch the success action.\nstore.dispatch({\n  type: actionTypes.READ_RESOURCES_SUCCEEDED,\n  resourceType: 'books',\n  // The `resources` list here is usually the response from an API call\n  resources: [{\n    id: 24,\n    title: 'My Name is Red',\n    releaseYear: 1998,\n    author: 'Orhan Pamuk'\n  }]\n});\n```\n\nLater, in your view layer, you can access information about the status of\nthis request. When it succeeds, accessing the returned book is straightforward.\n\n```js\nimport { getStatus } from 'redux-resource';\nimport store from './store';\n\nconst state = store.getState();\n// The second argument to this method is a path into the state tree. This method\n// protects you from needing to check for undefined values.\nconst readStatus = getStatus(store, 'books.meta[24].readStatus');\n\nif (readStatus.pending) {\n  console.log('The request is in flight.');\n}\n\nelse if (readStatus.failed) {\n  console.log('The request failed.');\n}\n\nelse if (readStatus.succeeded) {\n  const book = state.books.resources[24];\n\n  console.log('The book was retrieved successfully, and here is the data:', book);\n}\n```\n\nThis is just a small sample of what it's like working with Redux Resource.\n\nFor a real-life webapp example that uses many more CRUD operations, check out\nthe **[zero-boilerplate-redux webapp ⇗](https://github.com/jamesplease/zero-boilerplate-redux)**.\nThis example project uses [React](https://facebook.github.io/react/), although\nRedux Resource works well with any view layer.\n\n### Repository Structure\n\nThis repository is a [Lerna](https://github.com/lerna/lerna) project. That means\nit's a single repository that allows us to control the publishing of a number\nof packages. The source for each package can be found in the[\n  `./packages`](https://github.com/jamesplease/redux-resource/tree/master/packages)\n  directory.\n\n| Package | Version | Size | Description |\n| ---- | ---- | ---- | ---- |\n| `redux-resource` | [![npm version](https://img.shields.io/npm/v/redux-resource.svg)](https://www.npmjs.com/package/redux-resource) | [![gzip size](http://img.badgesize.io/https://unpkg.com/redux-resource/dist/redux-resource.min.js?compression=gzip)](https://unpkg.com/redux-resource/dist/redux-resource.min.js) | The main library |\n| `redux-resource-xhr` | [![npm version](https://img.shields.io/npm/v/redux-resource-xhr.svg)](https://www.npmjs.com/package/redux-resource-xhr) | [![gzip size](http://img.badgesize.io/https://unpkg.com/redux-resource-xhr/dist/redux-resource-xhr.min.js?compression=gzip)](https://unpkg.com/redux-resource-xhr/dist/redux-resource-xhr.min.js) | A library that exports a powerful HTTP CRUD action creator |\n| `redux-resource-plugins` | [![npm version](https://img.shields.io/npm/v/redux-resource-plugins.svg)](https://www.npmjs.com/package/redux-resource-plugins) | [![gzip size](http://img.badgesize.io/https://unpkg.com/redux-resource-plugins/dist/redux-resource-plugins.min.js?compression=gzip)](https://unpkg.com/redux-resource-plugins/dist/redux-resource-plugins.min.js) | A collection of common plugins |\n| `redux-resource-prop-types` | [![npm version](https://img.shields.io/npm/v/redux-resource-prop-types.svg)](https://www.npmjs.com/package/redux-resource-prop-types) | [![gzip size](http://img.badgesize.io/https://unpkg.com/redux-resource-prop-types/dist/redux-resource-prop-types.min.js?compression=gzip)](https://unpkg.com/redux-resource-prop-types/dist/redux-resource-prop-types.min.js) | Handy Prop Types to use with Redux Resource |\n| `redux-resource-action-creators` | [![npm version](https://img.shields.io/npm/v/redux-resource-action-creators.svg)](https://www.npmjs.com/package/redux-resource-action-creators) | [![gzip size](http://img.badgesize.io/https://unpkg.com/redux-resource-action-creators/dist/redux-resource-action-creators.min.js?compression=gzip)](https://unpkg.com/redux-resource-action-creators/dist/redux-resource-action-creators.min.js) | Unopinionated action creators for Redux Resource (bring your own HTTP request) |\n\n### Contributing\n\nThanks for your interest in helping out! Check out the\n[Contributing Guide](./CONTRIBUTING.md), which covers everything you'll need to\n get up and running.\n\n### Contributors\n\n([Emoji key](https://github.com/kentcdodds/all-contributors#emoji-key))\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n| [\u003cimg src=\"https://avatars3.githubusercontent.com/u/2322305?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eJames, please\u003c/sub\u003e](http://www.jmeas.com)\u003cbr /\u003e[💻](https://github.com/jamesplease/redux-resource/commits?author=jamesplease \"Code\") [🔌](#plugin-jamesplease \"Plugin/utility libraries\") [📖](https://github.com/jamesplease/redux-resource/commits?author=jamesplease \"Documentation\") [🤔](#ideas-jamesplease \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/682566?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eStephen Rivas JR\u003c/sub\u003e](http://www.stephenrivasjr.com)\u003cbr /\u003e[💻](https://github.com/jamesplease/redux-resource/commits?author=sprjr \"Code\") [📖](https://github.com/jamesplease/redux-resource/commits?author=sprjr \"Documentation\") [🤔](#ideas-sprjr \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars0.githubusercontent.com/u/4119765?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eIan Stewart\u003c/sub\u003e](https://github.com/ianmstew)\u003cbr /\u003e[🤔](#ideas-ianmstew \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/181635?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eTim Branyen\u003c/sub\u003e](http://tbranyen.com/)\u003cbr /\u003e[🤔](#ideas-tbranyen \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/254562?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eJason Laster\u003c/sub\u003e](https://github.com/jasonLaster)\u003cbr /\u003e[🤔](#ideas-jasonLaster \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/1104846?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003emarlonpp\u003c/sub\u003e](https://github.com/marlonpp)\u003cbr /\u003e[🤔](#ideas-marlonpp \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/4296756?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eJavier Porrero\u003c/sub\u003e](https://github.com/JPorry)\u003cbr /\u003e[🤔](#ideas-JPorry \"Ideas, Planning, \u0026 Feedback\") |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| [\u003cimg src=\"https://avatars2.githubusercontent.com/u/25591356?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eSmai Fullerton\u003c/sub\u003e](https://github.com/smaifullerton-wk)\u003cbr /\u003e[📖](https://github.com/jamesplease/redux-resource/commits?author=smaifullerton-wk \"Documentation\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/276971?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003evinodkl\u003c/sub\u003e](https://github.com/vinodkl)\u003cbr /\u003e[🤔](#ideas-vinodkl \"Ideas, Planning, \u0026 Feedback\") | [\u003cimg src=\"https://avatars3.githubusercontent.com/u/828125?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eEric Valadas\u003c/sub\u003e](https://github.com/ericvaladas)\u003cbr /\u003e[📖](https://github.com/jamesplease/redux-resource/commits?author=ericvaladas \"Documentation\") | [\u003cimg src=\"https://avatars0.githubusercontent.com/u/195580?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eJeremy Fairbank\u003c/sub\u003e](http://blog.jeremyfairbank.com)\u003cbr /\u003e[🚇](#infra-jfairbank \"Infrastructure (Hosting, Build-Tools, etc)\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/4226956?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eYihang Ho\u003c/sub\u003e](https://www.yihangho.com)\u003cbr /\u003e[💻](https://github.com/jamesplease/redux-resource/commits?author=yihangho \"Code\") | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/1026002?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eBryce Reynolds\u003c/sub\u003e](https://github.com/brycereynolds)\u003cbr /\u003e[💡](#example-brycereynolds \"Examples\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/5614134?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eBen Creasy\u003c/sub\u003e](http://bencreasy.com)\u003cbr /\u003e[📖](https://github.com/jamesplease/redux-resource/commits?author=jcrben \"Documentation\") |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors)\nspecification. Contributions of any kind are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesplease%2Fredux-resource-3.0-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesplease%2Fredux-resource-3.0-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesplease%2Fredux-resource-3.0-docs/lists"}