{"id":13990888,"url":"https://github.com/mgcrea/redux-rest-resource","last_synced_at":"2025-07-22T13:31:54.667Z","repository":{"id":7868467,"uuid":"55767979","full_name":"mgcrea/redux-rest-resource","owner":"mgcrea","description":"Seamless REST interaction for Redux","archived":false,"fork":false,"pushed_at":"2023-07-18T20:45:34.000Z","size":1243,"stargazers_count":188,"open_issues_count":2,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-09T19:40:02.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mgcrea.gitbook.io/redux-rest-resource/","language":"TypeScript","has_issues":false,"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/mgcrea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-08T09:39:39.000Z","updated_at":"2023-09-22T19:02:41.000Z","dependencies_parsed_at":"2024-01-18T05:19:42.979Z","dependency_job_id":"ba76cb05-924b-4d43-8e47-fded10c6e509","html_url":"https://github.com/mgcrea/redux-rest-resource","commit_stats":{"total_commits":332,"total_committers":8,"mean_commits":41.5,"dds":0.4969879518072289,"last_synced_commit":"ed27e0cec287ba7120aac2a03ec5715799244d5c"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Fredux-rest-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Fredux-rest-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Fredux-rest-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Fredux-rest-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgcrea","download_url":"https://codeload.github.com/mgcrea/redux-rest-resource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227099043,"owners_count":17730698,"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-08-09T13:03:28.118Z","updated_at":"2024-11-29T10:32:01.165Z","avatar_url":"https://github.com/mgcrea.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# [Redux Rest Resource](https://mgcrea.gitbook.io/redux-rest-resource/)\n\n[![npm version](https://img.shields.io/npm/v/redux-rest-resource.svg)](https://github.com/mgcrea/redux-rest-resource/releases)\n[![license](https://img.shields.io/github/license/mgcrea/redux-rest-resource.svg?style=flat)](https://tldrlegal.com/license/mit-license)\n[![build status](http://img.shields.io/travis/mgcrea/redux-rest-resource/master.svg?style=flat)](http://travis-ci.org/mgcrea/redux-rest-resource)\n[![dependencies status](https://img.shields.io/david/mgcrea/redux-rest-resource.svg?style=flat)](https://david-dm.org/mgcrea/redux-rest-resource)\n[![devDependencies status](https://img.shields.io/david/dev/mgcrea/redux-rest-resource.svg?style=flat)](https://david-dm.org/mgcrea/redux-rest-resource#info=devDependencies)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/fdbf36d00e5d49c4879b91920e3e9b08)](https://www.codacy.com/app/mgcrea/redux-rest-resource?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=mgcrea/redux-rest-resource\u0026utm_campaign=Badge_Coverage)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fdbf36d00e5d49c4879b91920e3e9b08)](https://www.codacy.com/app/mgcrea/redux-rest-resource?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=mgcrea/redux-rest-resource\u0026utm_campaign=Badge_Grade)\n\nDead simple and ready-to-use store module for handling HTTP REST resources.\n\n## 🚧 Deprecation notice\n\n**This project is no longer maintained as better alternatives came out.**\n\n**Please use [RTK-Query](https://redux-toolkit.js.org/tutorials/rtk-query) from the [Redux Toolkit](https://github.com/reduxjs/redux-toolkit) project instead.**\n\n## Description\n\nGenerates types, actions and reducers for you to easily interact with any REST API.\n\nSaves you from writing a lot of boilerplate code and ensures that your code stays [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).\n\n- Requires [redux-thunk](https://github.com/gaearon/redux-thunk) to handle async actions.\n\n- Relies on [fetch](https://fetch.spec.whatwg.org/) to perform HTTP requests.\n\n- Built with [TypeScript](https://www.typescriptlang.org/) for static type checking with exported types along the library.\n\n## [Documentation](https://mgcrea.gitbook.io/redux-rest-resource/)\n\n**Check the [full documentation](https://mgcrea.gitbook.io/redux-rest-resource/)** (built with [gitbook](https://github.com/GitbookIO/gitbook)).\n\n- **https://mgcrea.gitbook.io/redux-rest-resource/**\n\n## [Preview](https://mgcrea.gitbook.io/redux-rest-resource//docs/usage/Quickstart.html)\n\nBasically using a REST endpoint with Redux can be done with only a few lines:\n\n```ts\nimport {createResource} from 'redux-rest-resource';\n\nconst hostUrl = 'https://api.mlab.com:443/api/1/databases/sandbox/collections';\nconst apiKey = 'xvDjirE9MCIi800xMxi4EKeTm8e9FUBR';\n\ntype User = {\n  id: string;\n  firstName: string;\n  lastName: string;\n};\n\nexport const {types, actions, rootReducer} = createResource\u003cUser\u003e({\n  name: 'user',\n  url: `${hostUrl}/users/:id?apiKey=${apiKey}`\n});\n```\n\n\u003e NOTE: If you want to use this in environments without a builtin `fetch` implementation, you need to [bring your own custom fetch polyfill](advanced/CustomFetch).\n\n### Available scripts\n\n| **Script**    | **Description**              |\n| ------------- | ---------------------------- |\n| start         | alias to `test:watch`        |\n| test          | Run unit tests               |\n| test:watch    | Watch unit tests             |\n| test:coverage | Run unit tests with coverage |\n| lint          | Run eslint static tests      |\n| compile       | Compile the library          |\n| compile:watch | Watch compilation            |\n| docs          | Serve docs                   |\n| docs:compile  | Compile docs                 |\n\n## Authors\n\n**Olivier Louvignes**\n\n- http://olouv.com\n- http://github.com/mgcrea\n\nInspired by the [AngularJS resource](https://github.com/angular/angular.js/blob/master/src/ngResource/resource.js).\n\n## License\n\n```\nThe MIT License\n\nCopyright (c) 2016 Olivier Louvignes\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgcrea%2Fredux-rest-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgcrea%2Fredux-rest-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgcrea%2Fredux-rest-resource/lists"}