reactive-forms-vs-template-driven-forms

Hi viewers, In this article, you will learn the difference between Reactive forms and Template-driven forms

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

Leave a Reply

Your email address will not be published. Required fields are marked *