https://github.com/qiniu/formstate-x
Manage state of form with ease.
https://github.com/qiniu/formstate-x
form formstate mobx state typescript
Last synced: about 1 year ago
JSON representation
Manage state of form with ease.
- Host: GitHub
- URL: https://github.com/qiniu/formstate-x
- Owner: qiniu
- License: mit
- Created: 2019-10-15T03:22:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-11T01:28:06.000Z (about 1 year ago)
- Last Synced: 2025-04-26T12:45:22.672Z (about 1 year ago)
- Topics: form, formstate, mobx, state, typescript
- Language: TypeScript
- Homepage: https://qiniu.github.io/formstate-x
- Size: 4.41 MB
- Stars: 33
- Watchers: 6
- Forks: 9
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# formstate-x
[](https://github.com/qiniu/formstate-x/actions?query=workflow%3ACI+branch%3Amaster)
[](https://coveralls.io/github/qiniu/formstate-x?branch=master)
[](https://github.com/qiniu/formstate-x/actions?query=workflow%3ADoc+branch%3Amaster)
[](https://github.com/qiniu/formstate-x/actions?query=workflow%3APublish+branch%3Amaster)
formstate-x is a tool to help you manage form state, based on [MobX](https://mobx.js.org/). formstate-x provides:
* **Composability**: Forms are composition of inputs, complex inputs are composition of simpler inputs. With composability provided by formstate-x, you can build arbitrary complex forms or input components with maximal code reuse.
* **Type safety**: With Typescript, no matter how complex or dynamic the form logic is, you can get type-safe result for value, error, validator, etc.
* **Reactive validation**: With reactivity system of MobX, every dependency change triggers validation automatically and you can easily react to state change
* **UI-independent**: formstate-x only deals with state / data, you can easily use it with any UI library you like
### Documentation
You can find full documentation [here](https://qiniu.github.io/formstate-x/).
### Contributing
1. Fork the repo and clone the forked repo
2. Install dependencies
```shell
npm i
```
3. Edit the code
4. Do lint & unit test
```shell
npm run validate
```
5. Commit and push, then create a pull request