What are the differences between reactive forms and template driven forms?

Below are the main differences between reactive forms and template driven forms

FeatureReactiveTemplate-Driven
Form model setupCreated(FormControl instance) in component explicitlyCreated by directives
Data updatesSynchronousAsynchronous
Form custom validationDefined as FunctionsDefined as Directives
TestingNo interaction with change detection cycleNeed knowledge of the change detection process
MutabilityImmutable(by always returning new value for FormControl instance)Mutable(Property always modified to new value)
ScalabilityMore scalable using low-level APIsLess scalable using due to abstraction on APIs

May 11, 2022
195