Skip to content
  • Sponsor bietkul/react-reactive-form

  • Notifications You must be signed in to change notification settings
  • Fork 33

Files

Latest commit

author
Kuldeep Saxena
Dec 19, 2017
fdc1ba9 · Dec 19, 2017

History

History
17 lines (14 loc) · 571 Bytes

Field.md

File metadata and controls

17 lines (14 loc) · 571 Bytes

Field

A higher order component which subscribes a react component to a particular control's state changes i.e the component will re-render only when it's or it's parent's state changes.

Props

control: AbstractControl;

It's a required prop to tell the Field that which control has to be used for subscription. You can subscribe a FormArray, FormControl and FormGroup.

render: (control: AbstractControl) => React.ReactElement<any>;

A callback which returns a react component which needs to be re-render whenever the control state changes.