As you know, form is a little bit annoying in React. RxForm is a small library that help you:
- Maintain Form state
 - Validation and error messages
 - Handling form submission
 
Compare with Redux Form:
- Your can use it directly in your project, no need any config.
 - It's more friendly to Typescript.
 
If you dont' want to use it someday, it is convenient to switch to redux-form. Because their interfaces are the same. So don't worry, just give it a try!
npm install @react-rx/form
import React, { Component } from "react";
import { Field, RxForm } from "@react-rx/form";
export class ContactForm extends Component {
  onSubmit = (formValues: any) => {
    console.log(formValues);
  };
  render() {
    return (
      <RxForm>
        {({ handleSubmit }) => (
          <form onSubmit={handleSubmit(this.onSubmit)}>
            <Field name="firstName">
              {({ value, onChange }) => (
                <input value={value} onChange={onChange} type="text" placeholder="First Name" />
              )}
            </Field>
            <button type="submit">Submit</button>
          </form>
        )}
      </RxForm>
    );
  }
}Please check more examples here.
The Form component which maintain all fields state.
- 
initialValues: { [fieldName: string]: TFieldValue }Form initial values.
 - 
children: (props) => ReactNodeA render prop, which provide the following props to it's children:
- 
handleSubmit: (onSubmit: TOnSubmit) => (formEvent: React.FormEvent) => any - 
When
handleSubmitfunction fired,onSubmitwill be called with the following parameters:values: { [fieldName: string]: TFieldValue }onSubmitError: (errors: { [fieldName: string]: TErrorMsg }) => any
 
 - 
 
The Field Component is connect each individual input to RxForm.
- 
name: stringField name
 - 
children: (props) => ReactNodeA render prop, which provide the flowing props to it's children:
name: stringonChange: (value: React.MouseEvent | TFieldValue) => voidonBlur: (value: React.MouseEvent | TFieldValue) => voidonFocus: () => voidvalue?: TFieldValuemetadirty?: booleantouched?: booleanvisited?: booleanerror?: TErrorMsg
 - 
defaultValue?: TFieldValueField default value
 - 
validate?: TValidator | TValidator[]- TValidator is a function which returns error message based on field value.
(value: TFieldValue) => string | undefined
 - Default be called when field 
onChangeand formstartSubmit 
 - TValidator is a function which returns error message based on field value.
 - 
format?: (value: TFieldValue) => TFieldValueFormat field value to be displayed in field input. For example, we can format number to currency. Should be used with
parsein pairs. For example, covert numbers into currencies(format(10000) => 10,000$). - 
parse?: (value: TFieldValue) => TFieldValueParse field input display value to be stored in RxForm. Should be used with
formatin pairs. For example, covert currencies into numbers(parse(10,000$) => 10000). - 
normalize?: (value: TFieldValue) => TFieldValueConvert whatever the user has entered into the value that you want display in the Field and store in RxForm. For example, covert user inputs to be in all uppercase(
normalize(value) => value.toUppercase()) - 
destroyValueOnUnmount?: booleanWhen field unmount, determine whether to destroy the field value or not.
 
- 
name: string- Field array name.
 
 - 
children: (props) => ReactNodeA render prop, which provide the flowing props to it's children:
add: () => any- Add an item to the end of the array.
 
remove: (idx: number) => any- Removes an item from the array by index.
 
each: (mapper: (fieldName: string, idx: number) => React.ReactNode) => React.ReactNode- A method to iterate over each value of the array.
 
 - 
initLength?: numberThe init length of the array.
 
The FormSection component makes it easy to split forms into smaller components that are reusable across multiple forms. It does this by prefixing the name of Field, FieldArray children, at any depth, with the value specified in the name prop.
- 
name: stringThe name all child fields should be prefixed with.
 - 
children: React.ReactNode 
The FormValues component provides form values to it's children.
- 
children: (props) => ReactNodeA render prop, which provide the flowing props to it's children:
formValues: { [fieldName: string]: TFieldValue }updateFormValues: (formValues: IFormValues) => any
 
The WithForm components provide form context to it's children.
- 
children: (props) => ReactNodeA render prop, which provide the flowing props to it's children:
dispatch: (fieldAction: IFieldAction) => anysubscribe: (observer: Observer<any>) => anysubscribeFormAction: (observer: Observer<any>) => anyupdateFormValues: (formValues: IFormValues) => anygetFormValues: () => IFormValuesgetFormState: () => IFormStatefieldPrefix?: stringsetErrors: (errors: TErrors) => any