{"id":16384420,"url":"https://github.com/muyunyun/todolist","last_synced_at":"2025-10-11T12:49:00.134Z","repository":{"id":15288103,"uuid":"77832063","full_name":"MuYunyun/todoList","owner":"MuYunyun","description":"在React中使用Redux","archived":false,"fork":false,"pushed_at":"2022-12-08T18:18:52.000Z","size":1419,"stargazers_count":31,"open_issues_count":15,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-14T20:47:44.159Z","etag":null,"topics":["react","redux"],"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/MuYunyun.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":"2017-01-02T12:31:14.000Z","updated_at":"2024-05-28T14:45:02.000Z","dependencies_parsed_at":"2023-01-11T20:23:05.901Z","dependency_job_id":null,"html_url":"https://github.com/MuYunyun/todoList","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MuYunyun/todoList","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuYunyun%2FtodoList","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuYunyun%2FtodoList/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuYunyun%2FtodoList/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuYunyun%2FtodoList/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuYunyun","download_url":"https://codeload.github.com/MuYunyun/todoList/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuYunyun%2FtodoList/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007195,"owners_count":26084249,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["react","redux"],"created_at":"2024-10-11T04:11:25.492Z","updated_at":"2025-10-11T12:49:00.110Z","avatar_url":"https://github.com/MuYunyun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### How to write your own redux\n\n\u003ca href=\"http://MuYunyun.github.io/todoList\" target=\"\\_blank\"\u003e效果展示\u003c/a\u003e\n\n该 demo 已被整合到 [reactSPA](https://github.com/MuYunyun/reactSPA), [在线展示](http://muyunyun.cn/reactSPA)。这个项目中对 redux 的使用作了一个比较完整的示范。\n\n```js\n$ git clone https://github.com/MuYunyun/todoList.git\ncd todoList\nyarn\nyarn start\n```\n\n\u003e redux 使用见分支 [feature/redux](https://github.com/MuYunyun/todoList/tree/feature/redux)\n\n### 使用 React Hooks 替代 Redux\n\n在 React 16.8 版本之后, 如果`不是特别复杂`的业务场景, 可以使用 React 提供的 `useContext、useReducer` 实现自定义简化版的 redux, 可见该项目 master 分支。\n\n\u003e 特别复杂的场景暂时不建议使用此模式, 原因见 [react-redux v7 回退到订阅的原因](https://github.com/reduxjs/react-redux/issues/1177)\n\n### 相关链接\n\n* [redux middleware 源码分析](https://github.com/MuYunyun/blog/issues/15)\n* [如何写一个 redux](https://github.com/MuYunyun/blog/blob/master/React/%E7%9B%B8%E5%85%B3%E6%8A%80%E6%9C%AF%E6%A0%88/Redux%E4%B8%8EMobx%E9%80%82%E7%94%A8%E5%9C%BA%E6%99%AF.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuyunyun%2Ftodolist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuyunyun%2Ftodolist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuyunyun%2Ftodolist/lists"}