Closed besLisbeth closed 6 years ago
So. The reason for multiple render is that (props) => <Component {...props}/>
always creates a new function as parent component rerenders. That causes ContolArray
to replace the inner component with a new instance on the same component.
When you do a component replacement check react docs bullet number 4.
So just use component={Component}
- this is safe and correct way.
Passing function to ControlArray component property causes double render with an extra fields` registration in the form.
Example:
Also the errors:
With
component={Component}
no errors occured.