Let's talk about Signals Forms a bit.
I have seen some questions...
-> Like "why do we need it?"
-> What are signals broo... ?
For the last one...
... I'm not going to provide answer 🤣
Benefits of Signals Forms however
is an interesting topic. 👇
Based on deeply hidden prototype
that Angular Team is working on
My own understanding of it:
1. Signal = ultimate source of truth
- no duplicate state inside FormControl/FormGroup
2. Less boilerplate overall
3. Fine-Grained Reactivity
- your favorite term :D, thanks to Signals we get push based, change detection friendly state
( value, errors, valid, disabled etc)
4. Declarative TypeSafe
- declare a Schema ones, rules stay close to data model
- full TypeScript inference
5. Composability
- we can reuse schema on nested objects or dynamic array items
- applyWhen / applyWhenValue attaches logic only when a reactive condition is true
= cleaner than imperative if (...) { addControl() }
6. Awesome Async Validation
- pending state is built-in
- validateHttp / validateAsync
you only map server data → errors.
7. Improved submit flow
- no manual setErrors
- submit(field, action) toggles 'submitting' status tree-wide
8. One binding Mechanism
- [control] is THE single glue directive that binds any UI element (native or CVA component) to a field
9. valueChanges be gone and never come back <3
--------
Can't wait for
@AngularConnect talk on this very topic !!!
Want to see the code for Signal Forms prorotype?
Link in comments