{"id":22098605,"url":"https://github.com/ariesjia/use-reducer-middlewares","last_synced_at":"2025-07-24T22:33:40.397Z","repository":{"id":34646366,"uuid":"181595972","full_name":"ariesjia/use-reducer-middlewares","owner":"ariesjia","description":"enhance React Hooks API `useReducer` can use middleware","archived":false,"fork":false,"pushed_at":"2024-03-05T02:48:50.000Z","size":4969,"stargazers_count":4,"open_issues_count":30,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-21T01:47:37.410Z","etag":null,"topics":["middleware","react-hooks","use-reducer"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ariesjia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-16T02:02:19.000Z","updated_at":"2024-03-05T02:48:54.000Z","dependencies_parsed_at":"2023-01-15T08:30:26.596Z","dependency_job_id":null,"html_url":"https://github.com/ariesjia/use-reducer-middlewares","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariesjia%2Fuse-reducer-middlewares","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariesjia%2Fuse-reducer-middlewares/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariesjia%2Fuse-reducer-middlewares/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ariesjia%2Fuse-reducer-middlewares/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ariesjia","download_url":"https://codeload.github.com/ariesjia/use-reducer-middlewares/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227482940,"owners_count":17780073,"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":["middleware","react-hooks","use-reducer"],"created_at":"2024-12-01T04:21:01.748Z","updated_at":"2024-12-01T04:21:02.731Z","avatar_url":"https://github.com/ariesjia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-reducer-middlewares\n\u003e enhance React Hooks API `useReducer` can use middleware.\n\n[![NPM](https://img.shields.io/npm/v/use-reducer-middlewares.svg)](https://www.npmjs.com/package/use-reducer-middlewares)\n[![Build Status](https://travis-ci.org/ariesjia/use-reducer-middlewares.svg?branch=master)](https://travis-ci.org/ariesjia/use-reducer-middlewares)\n[![minified](https://badgen.net/bundlephobia/minzip/use-reducer-middlewares)](https://bundlephobia.com/result?p=use-reducer-middlewares)\n[![license](https://badgen.net/badge/license/MIT/blue)](https://github.com/ariesjia/use-reducer-middlewares/blob/master/LICENSE)\n[![coverage](https://badgen.net/codecov/c/github/ariesjia/use-reducer-middlewares)](https://codecov.io/gh/ariesjia/use-reducer-middlewares)\n\n\n## Install\n```bash\n// use yarn\nyarn add use-reducer-middlewares\n// use npm\nnpm install use-reducer-middlewares\n```\n\n## Demo\n\n```javascript\nimport useMiddleWares from 'use-reducer-middlewares'\nimport logger from 'redux-logger'\n\nconst reducer = function (state, action) {\n  // reducer\n  return state\n}\n\nconst init = function(count) {\n  return {count}\n}\n\nconst [state, dispatch] = useMiddleWares(reducer, 1, init)([\n  logger\n]);\n```\n\n## Sandbox Demo\n(Code Sandbox Demo)[https://codesandbox.io/s/wk3o2jp1ll]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fariesjia%2Fuse-reducer-middlewares","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fariesjia%2Fuse-reducer-middlewares","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fariesjia%2Fuse-reducer-middlewares/lists"}