{"id":18647928,"url":"https://github.com/cnu4/github-explorer-redux","last_synced_at":"2026-05-11T05:32:44.753Z","repository":{"id":101838195,"uuid":"66132075","full_name":"cnu4/github-explorer-redux","owner":"cnu4","description":"github-explorer using redux","archived":false,"fork":false,"pushed_at":"2016-08-25T13:40:42.000Z","size":2041,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T12:26:14.286Z","etag":null,"topics":["github","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/cnu4.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-20T06:25:53.000Z","updated_at":"2017-02-26T14:56:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"78184e71-9b19-449d-9b72-50eb88f4574c","html_url":"https://github.com/cnu4/github-explorer-redux","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/cnu4%2Fgithub-explorer-redux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnu4%2Fgithub-explorer-redux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnu4%2Fgithub-explorer-redux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnu4%2Fgithub-explorer-redux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnu4","download_url":"https://codeload.github.com/cnu4/github-explorer-redux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449888,"owners_count":19640621,"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":["github","redux"],"created_at":"2024-11-07T06:28:21.595Z","updated_at":"2025-11-05T07:30:33.443Z","avatar_url":"https://github.com/cnu4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 使用redux改写的github-explorer\n\n# Introduction\n\n刚学习了redux不久，恰好看到一个优秀的react项目[github-explorer][1]，该应用使用了RxJS去处理数据流，为了巩固学习便有了使用redux改写的想法。\n\n\n[源码地址][2]\n[DEMO地址][3]\n\n## 自定义中间件\n\n应用中使用了自定义个中间件**api**，方便编写异步的 action creators。异步action可以定义成以下方式\n\n```\nexport function loadUserProfileRepos (username) {\n  return {\n    types: [USER_PROFILE_REPOS_REQUEST, USER_PROFILE_REPOS_RECEIVED, USER_PROFILE_REPOS_FAILURE],\n    callAPI: () =\u003e api('fechURL`)\n  }\n}\n```\n\n中间件接收到这种形式的action，会处理异步请求并在适当的时候dispatch`types`中的各项。\n\n## 其他\n \n应用的拉取数据的进度条方面，负责拉取状态reducer在接收到诸如`xx_REQUEST`和`xx_RECEIVED`的actions后，会更新表示进度条状态的数据。\n\n因为只是巩固redux学习，所以原应用的部分动画效果没有加上。\n\n除了数据流部分，应用大部分都是照搬了原应用。\n\n\n#dependencies\n使用了redux后加上的依赖\n\n - redux\n - react-router-redux\n\n# Development\n\n开发\n\n```\nnpm install\nnpm run start\n```\n\n打包\n\n```\nnpm run dist\n```\n\n# Reference\n\n[github-explorer][1]\n[redux 文档][4]\n\n  [1]: https://github.com/trungdq88/github-explorer\n  [2]: https://github.com/cnu4/github-explorer-redux\n  [3]: https://cnu4.github.io/github-explorer-redux\n  [4]: http://cn.redux.js.org/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnu4%2Fgithub-explorer-redux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnu4%2Fgithub-explorer-redux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnu4%2Fgithub-explorer-redux/lists"}