{"id":26642767,"url":"https://github.com/ganyanchuan1989/electron-react","last_synced_at":"2026-05-04T12:37:39.607Z","repository":{"id":37187605,"uuid":"274560362","full_name":"ganyanchuan1989/electron-react","owner":"ganyanchuan1989","description":"electron app with react . fork to electron-vue project","archived":false,"fork":false,"pushed_at":"2022-11-10T21:32:33.000Z","size":5573,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-04T10:18:53.474Z","etag":null,"topics":["electron","electron-react","react"],"latest_commit_sha":null,"homepage":"","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/ganyanchuan1989.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":"2020-06-24T02:55:12.000Z","updated_at":"2020-06-30T08:15:41.000Z","dependencies_parsed_at":"2023-01-21T04:48:57.937Z","dependency_job_id":null,"html_url":"https://github.com/ganyanchuan1989/electron-react","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganyanchuan1989%2Felectron-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganyanchuan1989%2Felectron-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganyanchuan1989%2Felectron-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ganyanchuan1989%2Felectron-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ganyanchuan1989","download_url":"https://codeload.github.com/ganyanchuan1989/electron-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245337059,"owners_count":20598806,"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":["electron","electron-react","react"],"created_at":"2025-03-24T19:27:44.967Z","updated_at":"2026-05-04T12:37:34.574Z","avatar_url":"https://github.com/ganyanchuan1989.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-react\n\n基于electron-vue改造的electron-react版本，继承了electron-vue脚手架优点，如：热更新、目录结构清晰、静态资源本地路径转化等。electron-react视图层通过react重构，引入react的全家桶（react、react-router、redux），并增加C/S架构程序所关注的核心功能（日志，sqlite3，网络请求等）。\n\n\u003e 此版本是基于`electron-vue`进行改造。为什么不直接使用[https://github.com/electron-react-boilerplate/electron-react-boilerplate](https://github.com/electron-react-boilerplate/electron-react-boilerplate)呢？有以下几个原因。\n\u003e- 目录结构不清晰：直接run build 会在src目录中生成临时文件，感觉很不友好。\n\u003e- TS语法：对于非通用项目，TS语法反而增加开发工作量。\n\u003e- 使用过electron-vue 觉得项目结构清晰，使用起来方便。\n\n# 功能清单\n\n- sqlite3 \u0026 ORM：本地持久化存储\n- electron-builder：构建打包\n- electron-updater：自动更新\n- crashReporter：崩溃报告\n- LocalConfig：本机配置文件，适配多环境\n- plugins: 本地插件调用\n- mock \u0026 proxy: 本地开发支持mock与非mock请求\n- CssModule: 解决CSS命名冲突\n- ErrorBoundary: React 错误边界\n- antd: UI组件库\n\n\n# 使用\n\n```js\n// 采用mock方式启动dev\nnpm run dev:mock \n\n// 非mock方式\nnpm run dev\n\n// 构建\nnpm run build\n```\n\n# 示例\n\n- Counter示例：一个完整的redux示例，会在console中记录每次状态更新日志。\n- plugin 示例：调用本地插件打印PDF文件示例\n\n# 效果图\n\n- 首页\n\n![](./docs/imgs/home.png)\n\n- Counter\n\n![](./docs/imgs/counter.png)\n\n- Plugin\n\n![](./docs/imgs/plugin.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganyanchuan1989%2Felectron-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fganyanchuan1989%2Felectron-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fganyanchuan1989%2Felectron-react/lists"}