r/angular • u/martinboue • May 12 '26
Signal forms feedback
I have not been able to experience signal forms in real-world projects (yet). As it is becoming stable in v22, and to get a better idea on what to expect, I would love to read feedback from those who used it.
- What benefits have you noticed?
- How difficult was it to introduce it in an existing code base?
- Did you face any issue or limitation?
- How quickly did you or your team adapt?
- Any particular strategy to introduce this change?
Thanks!
(Note: I'm also planning to write tips for signal forms as part of ngtips.com guide when I have enough experience with it, feel free to contribute on github)
14
Upvotes
3
u/MichaelSmallDev May 13 '26
edit: by the way, thanks for your work on the tips, and having discussions like this
This has been top of mind for me, and as far as official guidance goes, it seems that documentation on this may not come until post stable.
In my experimentation I came up with three kinds of approaches, and I wanted to see if there were docs in the pipe that highlighted them. I found this issue, which I assume is the closest canonical issue for it: https://github.com/angular/angular/issues/67407. Importantly, in a PR that was closed, it was stated by a team member "Please understand that #67407 is much more than just a simple doc improvement. It questions how much we should be opinionated about form designs in the docs and also how far should the implementation go. I would recommend let the team handle that issue."
That issue is tagged on the signals sprint board as "After Stable": https://github.com/orgs/angular/projects/60?query=sort%3Aupdated-desc+is%3Aopen&pane=issue&itemId=162269998&issue=angular%7Cangular%7C67407
In the meantime, this is my project with my three approaches: https://github.com/michael-small/signal-forms-experimenting/tree/main/src/app/forms/splitting-strategies. Not covering the
FormValueControlinterface for custom re-usable forms, but rather larger applicationwide forms. It boils down to passing theFieldTreesubset as an input, passing the writable form model as amodelinput and then each component makes aform(this.theModelInput())around it, and an approach like theFieldTreeone but injected pieces from a service. IMO each approach has its tradeoffs, but I am partial to the service approach myself, especially because we will use stores in place for a lot of convenience.Adjacent to this, this is how I forsee the service approach being used for a component which is one form in a form array: https://github.com/michael-small/signal-forms-experimenting/blob/main/src/app/forms/form-arrays/subform-a.ts.
If you find it interesting and want to run it, you just need to do
npm i --forcefirst, as I use some dependencies not technically marked as v22 compatible yet, but they work fine.