{"repo":"guokaigdg/react-seed","free":true,"listed":false,"github":"https://github.com/guokaigdg/react-seed","clone":"git clone https://github.com/guokaigdg/react-seed.git","description":"🌱 React Seed: A seed, infinite possibilities. React Seed 种子项目，一颗种子无限可能","language":"TypeScript","stars":530,"topics":["axios","babel","eslint","mobx","mobx-react","mobx-react-lite","prettier","react","react-hooks","react-router-dom"],"license":"MIT","category":"ui-components","readme_excerpt":"React Seed 开箱即用的 React 前端模板 🔗 在线 Demo - PC 端：react-seed - 移动端：react-template-mobile 🪅 相关版本 - 📱 移动端版本：react-template-mobile ✨ 特性 - 📦 开箱即用，无需额外配置 - 📝 关键模块均有注释说明，学习成本低 - 🚀 启动与编译迅速 - 🌱 易于定制，方便拓展 - 🛡️ 严格的代码规范 🚀 技术栈 分类 选型 版本 ---- -------------------------------------------------------------------------------- --------- 框架 React + ReactDOM 19.x 语言 TypeScript 5.x 构建 Vite + @vitejs/plugin-react 8.x 路由 react-router 7.x 状态 MobX + mobx-react-lite 6.x / 4.x 请求 axios + axios-retry 1.x 样式 Less + CSS Modules + PostCSS — 图标 @phosphor-icons/react + 本地 svg as React 组件（ vite-plugin-svgr ） — 规范 ESLint 9 (flat config) + Prettier + Stylelint + husky + lint-staged + commitlint — ⌛️ 环境要求 - Node ≥ 22.22.1（CI 通过 volta 固定为 22.22.3） - npm ≥ 7.0.0 / yarn ≥ 1.22.4 / pnpm 任选其一 🏃 快速开始 📦 打包发布 📂 项目结构 🛠 开发指南 路径别名 在 tsconfig.json 与 vite.config.ts 中均已定义， 优先使用别名而非相对路径 ： 新增页面 1. 在 src/view/XxxPage/ 下创建 index.tsx + index.less 2. 在 src/router/index.tsx 中使用 SuspenseLazy 注册懒加载路由 3. 如需顶部导航入口，编辑 src/view/Tab/index.tsx 新增 API 1. 在 src/api/ / 下创建 index.ts 与 types/ .ts 2. 从 ../request 引入封装后的 request，调用 request ({url, method, data}) 3. 请求/响应类型集中在同目录 types/ 下 状态管理（MobX） - Store 构造函数调用 makeAutoObservable(this) ，异步赋值需包裹 runInAction(...) - 在 src/store/index.ts 的 stores 对象中注册新 store - 任何读取 observable 的组件 必须 使用 observer 包裹 更详细的开发约定与 AI 协作说明，请参阅 AGENTS.md。 📝 代码提交规范 提交格式遵循 commitlint 规范： 常用 type： type emoji 说明 -------- ----- ------------------------------------ feat ✨ 新功能 fix 🐛 Bug 修复 docs 📝 文档变更 style 💄 样式调整（不影响逻辑）","default_branch":null,"files":null,"tree":[],"storefront":"/r/guokaigdg","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/guokaigdg/react-seed/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}