1.0k GitHub stars and counting โ react-component/field-form is a TypeScript project TopGit is tracking across repositories on the platform. ๐ Performance-first React form state manager with field subscriptions, validation, lists, dependencies, and hook APIs.
Snapshot summary built from the project's own GitHub metadata โ there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then โ see the READ ME tab for the original README in full.
To keep sync with rc-form legacy usage of validator, we still provides callback to trigger validate finished. But in rc-field-form, we strongly recommend to return a Promise instead.
ListOperations
Prop
Type
add
(initValue: any) => void
remove
(index: number) => void
ValidateMessages
Validate Messages provides a list of error template. You can ref here for fully default templates.
Prop
Description
enum
Rule enum prop
len
Rule len prop
max
Rule max prop
min
Rule min prop
name
Field name
pattern
Rule pattern prop
type
Rule type prop
Different with rc-form
rc-field-form is try to keep sync with rc-form in api level, but there still have something to change:
1. Field will not keep snyc with initialValues when un-touched
In rc-form, field value will get from initialValues if user not operate on it.
It's a bug but user use as a feature which makes fixing will be a breaking change and we have to keep it.
In Field Form, this bug will not exist anymore. If you want to change a field value, use setFieldsValue instead.
2. Remove Field will not clean up related value
We do lots of logic to clean up the value when Field removed before. But with user feedback, remove exist value increase the additional work to keep value back with conditional field.
3. Nest name use array instead of string
In rc-form, we support like user.name to be a name and convert value to { user: { name: 'Bamboo' } }. This makes '.' always be the route of variable, this makes developer have to do additional work if name is real contains a point like app.config.start to be app_config_start and parse back to point when submit.
Field Form will only trade ['user', 'name'] to be { user: { name: 'Bamboo' } }, and user.name to be { ['user.name']: 'Bamboo' }.
4. Remove validateFieldsAndScroll
Since findDomNode is marked as warning in StrictMode. It seems over control of Form component.
We decide to remove validateFieldsAndScroll method and you should handle it with you own logic:
Notice: Now if your validator return an Error(message), not need to get error by e => e.message. FieldForm will handle this.
7. preserve is default to false
In rc-form you should use preserve to keep a value cause Form will auto remove a value from Field removed. Field Form will always keep the value in the Form whatever Field removed. But you can still use preserve=false to disable value keeping since 1.5.0.
8. setFields not trigger onFieldsChange and setFieldsValue not trigger onValuesChange
In rc-form, we hope to help user auto trigger change event by setting to make redux dispatch easier, but it's not good design since it makes code logic couping.
Additionally, user control update trigger onFieldsChange & onValuesChange event has potential dead loop risk.
Development
npm install
npm start
npm test
npm run lint
npm run tsc
npm run compile
npm run build
The dumi site runs at http://localhost:8000 by default.
Release
npm run prepublishOnly
The release flow is handled by @rc-component/np through the rc-np command after the package build.
License
@rc-component/form is released under the MIT license.
How active is development on react-component/field-form?
The most recent commit recorded on react-component/field-form was 15 days ago, based on the GitHub push timestamp. The repository has 283 forks โ one of the better signals of community interest.
How many stars does react-component/field-form have?
react-component/field-form has 1.0k GitHub stars โ refresh the page for the live number, or check github.com/react-component/field-form. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is react-component/field-form open source?
Yes โ react-component/field-form ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/react-component/field-form.
What else is in the Frontend space?
react-component/field-form is tracked by TopGit under the Frontend category, alongside 5 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What topics is react-component/field-form associated with?
GitHub's repository topics for react-component/field-form: "ant-design", "antd", "javascript", "react", "react-component". TopGit's editorial category is Frontend.
Where can I see react-component/field-form in action?
The project maintains a homepage at https://react-component.github.io/field-form. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about react-component/field-form?
This TopGit page is a snapshot โ the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/react-component/field-form is the definitive source.
Read full README in the tab above.
Curious whether field-form is right for you?
Let ChatGPT, Claude, or Perplexity look into it โ click below and see what AI actually says about field-form.