You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working with larger forms, deep nested forms & [Form Array’s](docs/api/FormArray.md) it’s highly recommended to use the [Field](docs/api/Field.md) component instead of `reactiveForm` method.
78
-
79
-
`Field` component subscribes a particular control & only update it when it’s or it’s parent’s state changes, which of course reduces the re-rendering and boost the performance significantly.
80
-
81
19
82
20
```js
83
21
importReact, { Component } from'react';
84
22
import { FormBuilder, Validators, Field } from"react-reactive-form";
For better performance with large forms & [Form Array’s](api/FormArray.md) it’s highly recommended to use the [Field](api/Field.md) component instead of `reactiveForm` method.
21
-
22
-
`Field` component subscribes a particular control & only update it when it’s or it’s parent’s state changes, which of course reduces the re-rendering and boost the performance significantly.
23
-
24
8
25
9
## Basic Usage Guide
26
10
### step 1: Create FormGroup or FormArray
@@ -58,100 +42,34 @@ const loginForm = new FormGroup({
58
42
```
59
43
60
44
### step2: Connect form with component
61
-
62
-
### With `reactiveForm`
63
-
64
-
Use the `reactiveForm` method to connect your form group or array to the Component in which you want to use input handlers.
65
-
Now you'll start receiving the [mapped control props](api/Props.md) with input handlers.
66
-
67
-
In below given example `username.handler` is a function which binds the input element to the `username` control.
[Field](api/Field.md) subscribes the component to a particular control's state changes which improves the performance by restricting the re-rendering of other fields.
45
+
[Field](api/Field.md) component subscribes a particular control & only update it when it’s or it’s parent’s state changes, which improves the performance by restricting the unnecessary re-rendering of other fields.
129
46
130
47
```js
131
48
importReact, { Component } from'react';
132
49
import { FormBuilder, Validators, Field } from"react-reactive-form";
0 commit comments