{"id":13634613,"url":"https://github.com/wuyafeiJS/dva-cnode","last_synced_at":"2025-04-18T23:32:28.013Z","repository":{"id":232743054,"uuid":"89346412","full_name":"wuyafeiJS/dva-cnode","owner":"wuyafeiJS","description":"用dva数据交互框架写cnode项目","archived":false,"fork":false,"pushed_at":"2018-05-03T01:51:16.000Z","size":968,"stargazers_count":19,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T04:35:43.096Z","etag":null,"topics":[],"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/wuyafeiJS.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}},"created_at":"2017-04-25T10:08:54.000Z","updated_at":"2021-05-18T02:54:03.000Z","dependencies_parsed_at":"2024-04-11T08:03:11.316Z","dependency_job_id":null,"html_url":"https://github.com/wuyafeiJS/dva-cnode","commit_stats":null,"previous_names":["wuyafeijs/dva-cnode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyafeiJS%2Fdva-cnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyafeiJS%2Fdva-cnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyafeiJS%2Fdva-cnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuyafeiJS%2Fdva-cnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wuyafeiJS","download_url":"https://codeload.github.com/wuyafeiJS/dva-cnode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565246,"owners_count":21292427,"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-02T00:00:27.434Z","updated_at":"2025-04-18T23:32:27.591Z","avatar_url":"https://github.com/wuyafeiJS.png","language":"JavaScript","funding_links":[],"categories":["Awesome-CNode"],"sub_categories":["React"],"readme":"# 在线浏览\n\n[https://wuyafeijs.github.io/dva-cnode/](https://wuyafeijs.github.io/dva-cnode/)\n# dva-cnode\n\n用dva数据交互框架写具有登录功能的cnode项目。\n\n![](images/1.png) ![](images/2.png) \n![](images/3.png) ![](images/4.png) \n\n## 为什么要用dva ?\n\n经过一段时间的自学或培训，大家应该都能理解 redux 的概念，并认可这种数据流的控制可以让应用更可控，以及让逻辑更清晰。\n\n但随之而来通常会有这样的疑问：概念太多，并且 reducer, saga, action 都是分离的（分文件）。\n\n这带来的问题是：\n\n编辑成本高，需要在 reducer, saga, action 之间来回切换\n不便于组织业务模型 (或者叫 domain model) 。比如我们写了一个 userlist 之后，要写一个 productlist，需要复制很多文件。\n还有一些其他的：\n\n\u003e* saga 书写太复杂，每监听一个 action 都需要走 fork -\u003e watcher -\u003e worker 的流程\n\u003e* entry 书写麻烦\n\n我个人认为dva相对于redux开发起来要方便很多。比如你不必单独的去创建action.js文件。dva是直接在dispatch时写清楚action就行了。它把侧重点放在了\nmodel（类似于reducer但比它做的事情要多）文件里面，便于数据逻辑的统一维护。特别是对于异步action,dva处理起来要轻松很多。你不必去在意请求时\nisFetching的状态，不需要每个异步请求都要派发三个action，因为dva内置loading插件，它会根据请求状态自动更新，从而让你专注于请求逻辑就行了。\n...\n而 dva 正是用于解决这些问题。\n## Getting Started\nInstall dependencies.\n\n```bash\n$ npm install\n```\n\nStart server.\n\n```bash\n$ npm start\n```\n\nIf success, app will be open in your default browser automatically.\n\n\n转载请注明出处，谢谢！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FwuyafeiJS%2Fdva-cnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FwuyafeiJS%2Fdva-cnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FwuyafeiJS%2Fdva-cnode/lists"}