本文档主要介绍项目的前端架构设计,包括技术选型、组件库、开发规范等。
技术栈
- 框架:React.js
- UI 组件库:Ant Design
- 状态管理:Redux
- 构建工具:Webpack
开发规范
- 代码风格:遵循 [Airbnb JavaScript Style Guide](https://github.com Airbnb/javascript)
- 组件命名:使用 kebab-case 命名方式
- 模块化:组件拆分,避免大而全的组件
图片示例
以下是一个 React 组件的示例:
import React from 'react';
import { Button } from 'antd';
const MyComponent = () => (
<div>
<h1>Hello, World!</h1>
<Button type="primary">点击我</Button>
</div>
);
export default MyComponent;
扩展阅读
React Logo
Ant Design Logo