{"id":28788888,"url":"https://github.com/ronffy/react-native-dva-typescript-starter","last_synced_at":"2025-07-11T01:42:23.122Z","repository":{"id":36810435,"uuid":"181281036","full_name":"ronffy/react-native-dva-typescript-starter","owner":"ronffy","description":"RN项目：用 dva 管理状态，typescript 做静态检查","archived":false,"fork":false,"pushed_at":"2023-01-03T19:40:43.000Z","size":2644,"stargazers_count":1,"open_issues_count":20,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-15T15:34:03.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ronffy.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-14T08:35:47.000Z","updated_at":"2021-09-03T06:59:58.000Z","dependencies_parsed_at":"2022-09-04T04:11:09.818Z","dependency_job_id":null,"html_url":"https://github.com/ronffy/react-native-dva-typescript-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ronffy/react-native-dva-typescript-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronffy%2Freact-native-dva-typescript-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronffy%2Freact-native-dva-typescript-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronffy%2Freact-native-dva-typescript-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronffy%2Freact-native-dva-typescript-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronffy","download_url":"https://codeload.github.com/ronffy/react-native-dva-typescript-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronffy%2Freact-native-dva-typescript-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260439504,"owners_count":23009296,"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":"2025-06-17T21:04:31.097Z","updated_at":"2025-07-11T01:42:23.103Z","avatar_url":"https://github.com/ronffy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 同桌项目 deskmate\n\n## 项目资料\n\n1. [项目地址](http://172.16.117.13/fe-team/deskmate)\n2. [字段名称](http://172.16.117.20:8090/pages/viewpage.action?pageId=2858606)\n\n## 技术介绍\n\n1. 用[dva](https://dvajs.com/guide/)管理状态，引入了[dva-loading](https://www.npmjs.com/package/dva-loading)处理loading状态\n2. 用[React Navigation](https://reactnavigation.org/docs/zh-Hans/getting-started.html)做路由，通过[react-navigation-redux-helpers](https://github.com/react-navigation/react-navigation-redux-helpers)将路由交给`redux`统一管理\n3. 用[typescript](https://www.tslang.cn/docs/home.html)做代码的静态检查，项目中已经对组件、model、方法等写好了demo，有疑问联系 王海荣\n4. 用fetch发网络请求，在此基础上加了字符串模版引擎，方便对接 RESTful 接口，还加了拦截器功能，方便处理服务端各种不同的状态码和失败的业务处理。\n\n## 安装项目\n\n安装依赖（npm 亦可，但避免使用cnpm，容易出现不可意料的问题）\n```\nyarn\n```\n\n链接`antd`的字体图标\n```\nreact-native link @ant-design/icons-react-native\n```\n\n安装`react-native-debugger`\n```\nbrew update \u0026\u0026 brew cask install react-native-debugger\n```\n\n\n## 跑ios项目\n\n在项目根目录执行以下命令\n```\nnpm run ios\n```\n\n\n\n## 跑android项目\n\n先打开 Android Studio , 运行模拟器或真机，然后在项目根目录执行以下命令\n```\nnpm run android\n```\n\n## 开启对应菜单\n在模拟器上分别开启`Debug JS Remotely`、`Enbug Live Reload`、`Enable Hot Reloading`;\n\n\n## 相关工具介绍\n\n!! 本项目使用的是`react-native-debugger`\n\n### Debug JS Remotely\n\n在开发者菜单中选择\"Debug JS Remotely\"选项，会自动打开调试页面 http://localhost:8081/debugger-ui\n\n### react-devtools\n\n用来查看 react-elements\nmac \\ window 都可以用\n\n安装\n```\nnpm install -g react-devtools\n```\n\n使用\n```\nreact-devtools\n```\n\n### react-native-debugger\n\ninstall \n```\nbrew update \u0026\u0026 brew cask install react-native-debugger\n```\n\n启动\n```\nopen \"rndebugger://set-debugger-loc?host=localhost\u0026port=8081\"\n```\n\n\n### react-native-windows\n（未研究）\n仅 window\n\n\n## 导航\n\n[React Navigation](https://reactnavigation.org/docs/zh-Hans/getting-started.html)\n+\n[react-navigation-redux-helpers](https://github.com/react-navigation/react-navigation-redux-helpers)\n\n\n## ui组件库\n\n!! 本项目使用`ant-design-mobile-rn`\n\n[ant-design-mobile-rn](https://github.com/ant-design/ant-design-mobile-rn)\n[react-native-elements](https://github.com/react-native-training/react-native-elements)\n\n\n## 存在问题\n\n1. 装饰器功能未能成功启用\n\n2. Network网络查看功能未实现\n\n3. ~~模拟器切页面较慢~~  \n解决方法：\n选中模拟器 -\u003e Debug -\u003e Slow Animations 取消选中\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronffy%2Freact-native-dva-typescript-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronffy%2Freact-native-dva-typescript-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronffy%2Freact-native-dva-typescript-starter/lists"}