Skip to content

Commit 3dc5a23

Browse files
committed
更新文档
1 parent 015ef78 commit 3dc5a23

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

README.en.md

+33
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,39 @@ Developed using React Hooks and TypeScript, it aims to provide a simple, efficie
1515
- **Documentation Support**: Utilizes TypeDoc to generate comprehensive documentation, helping developers better understand and use the features of the library.
1616
- **Flexible Packaging Support**: Uses Rollup for packaging, supporting UMD, CommonJS, and ES module formats to adapt to different usage scenarios and environments.
1717

18+
## Version Notes
19+
20+
- **Future Plans for Next Versions**
21+
22+
1. Support for object-nested forms.
23+
2. **Antd Components**: Still considering whether to adapt or not (it's still usable without adaptation). Due to the deep coupling of Antd's own Form.Item and Form, and the requirement for basic forms to be nested in Form.Item for standard display effects, adapting might not offer as good a development experience as using Antd's own forms. Still undecided.
24+
3. **MUI Components**: These components do not come with form validation, generally used with react-hook-form (which does not provide a good experience), so there will be adaptations in the future. However, as this component library is not currently used by our company, the priority is not high.
25+
26+
- **v1.0.0 (Official Release)**
27+
28+
1. Refactored the validation rule implementation class for a friendlier usage experience, and added several common validation rules [All common validation rules](https://luoanb.github.io/hook-form-react/classes/Verifications.html). The validation rules have not been fully tested; issues are welcome to be reported.
29+
2. **NextUI Components**: All forms have now been adapted [All adapted components](https://luoanb.github.io/hook-form-react/classes/NextUI_2_2.html) (any omissions will be updated, @manual dog, hehe)
30+
3. Fixed inaccurate type declarations.
31+
4. Added test projects for functionality verification.
32+
33+
- **v0.5.x (Core Implementation Preview)**
34+
35+
1. The core framework has been implemented, offering a smooth user experience, and can be directly used [see advanced usage]() below.
36+
2. Overall good extensibility, with component library related code and core form code being completely isolated, laying the foundation for future support of different component libraries.
37+
3. Complete control over form data state and form error state, allowing for customization according to business logic.
38+
4. Validation rules are also uniformly implemented, making extension and customization convenient.
39+
5. Zero dependencies, purely hooks-based.
40+
41+
## Component Library Support
42+
43+
- **90 Points**: NextUI provides a good experience, and issues are promptly fixed (also in use by ourselves).
44+
45+
- **60 Points**: MUI, given its lack of support for form validation, using hook-form-react is still a good choice. At least compared to react-hook-form, it doesn't have a bunch of complex concepts, right?
46+
47+
- **50 Points**: Antd components have a good native form experience, prefer to choose their own forms (subsequent adaptations mainly consider dual component library scenarios).
48+
49+
- **50 Points**: ......
50+
1851
## Installation
1952

2053
```shell

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Hook Form React
22

3+
This library is a lightweight, dependency-free solution for form validation and submission designed specifically for React applications.
4+
35
该库是一个专为 React 应用设计的轻量级、无依赖的表单验证和提交解决方案。
46

57
中文 [English](./README.en.md)
@@ -15,6 +17,39 @@
1517
- **文档支持**:使用 TypeDoc 生成详尽的文档,帮助开发者更好地理解和使用库中的功能。
1618
- **灵活的打包支持**:使用 Rollup 进行打包,支持 UMD、CommonJS 和 ES 模块格式,以适配不同的使用场景和环境。
1719

20+
## 版本说明
21+
22+
- **Next 后续版本计划**
23+
24+
1. 对于对象嵌套型表单的支持
25+
2. **Antd 组件**:正在考虑是否要适配(当然不适配也是可用的),由于 Antd 自有表单的 Form.Item 和 Form 深度耦合,且基础表单需要内嵌在 Form.Item 中才有规范的显示效果。适配后开发体验感觉很难有 Antd 自由表单好,还在犹豫中
26+
3. **MUI 组件**: 组件未自带表单验证,一般使用 react-hook-form(体验并不好),所以后续会进行适配,但由于当前企业并未使用该套组件库,所以优先级并不高
27+
28+
- **v1.0.0(正式版)**
29+
30+
1. 重构了验证规则实现类,使用会更友好,同时新增几个常用验证规则 [所有的常用验证规则](https://luoanb.github.io/hook-form-react/classes/Verifications.html)。验证规则并未完全经过测试,有问题欢迎@我。
31+
2. **NextUI 组件**:目前所有表单已经适配完成 [所有已适配组件](https://luoanb.github.io/hook-form-react/classes/NextUI_2_2.html) (如有遗漏后续会补上,@手动 dog,嘿嘿)
32+
3. 修复类型声明不准确问题。
33+
4. 添加测试项目,用于验证功能
34+
35+
- **v0.5.x (底层实现预览)**
36+
37+
1. 底层框架已实现,使用体验顺畅,可直接[往下看高级用法]()
38+
2. 整体拓展性良好,组件库相关代码和表单核心代码是完全隔离的,这为今后支持不同的组件库打下基础。
39+
3. 表单数据状态,表单异常状态完全可控,可以根据业务定制逻辑。
40+
4. 验证规则也是统一实现,拓展和自定义都很方便。
41+
5. 零依赖项,纯 hooks。
42+
43+
## 组件库支持情况
44+
45+
- 【90 分】 NextUI 体验良好,且有问题会及时修复(自己也在用)
46+
47+
- 【60 分】 MUI 在 MUI 自己不支持表单验证的前提下,使用 hook-form-react 也是不会错的,至少相对于 react-hook-form,它没有一堆复杂的概念不是吗。
48+
49+
- 【50 分】 Antd 组件自有表单使用体验不错的,优选选自有表单吧,(后续适配主要考虑双组件库情况)。
50+
51+
- 【50 分】 ......
52+
1853
## 安装
1954

2055
```shell

0 commit comments

Comments
 (0)