DEV Community

Discussion on: Why and how to manage state for Angular Reactive Forms

Collapse
 
mfp22 profile image
Mike Pearson Playful Programming Angular

It's nice because it easily gets form state into Redux Devtools. However, that's just about where the benefits end. Note that UpdateFormValue is basically synonymous with patchState. I will be adding an example soon to this article that shows why reactive state management is more flexible.

Collapse
 
devanky profile image
devAnky

Is there a patchValue directive that can be used with stateAdapt?

Thread Thread
 
mfp22 profile image
Mike Pearson Playful Programming Angular • Edited

If you use joinAdapters you can use update.

Image description

stackblitz.com/edit/state-adapt-an...

Thread Thread
 
devanky profile image
devAnky

Thank you for your very fast response! I think, I did not phrase my question precise enough and I am sorry for that. Let me make my question more specific: In github.com/joshuamorony/quicklist-... there is a TODO stating "Use [patchValue] directive to react to signal in template". I was looking for that kind of directive that would help with eliminate the imperative calls on reactive forms like patchValue() (or disable()). Thanks <3