-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will ngrx-forms be part of official NGRX project? #105
Comments
Nope. Read ngrx/platform#431 and ngrx/core#12 What they plan to do is some sort of bridge between angular reactive forms and ngrx (or something like that), they think that keeping forms state in a store is a bad idea. |
Indeed, as @fxck said the ngrx team is against putting form state into the store and therefore this library will most likely never become part of the ngrx project. |
Let me add though that the dependency of this library on ngrx itself is almost non-existant. Even the Angular parts aren't that big. And this library has only peer dependencies, no direct dependencies on anything else. Therefore personally I consider it to be low risk since the probability of compatibility issues of this with ngrx is very very low. |
Thanks for the comments. I suppose their argument against having form state in the store would be that most part of the form state can be computed based on just the form values. But if you have a form error notification that you display based on the validity of a form field, then I feel like it would justify having the error state of that field in the store as it would represent the state of the application, no? So what if instead of having the entire form state in the store, you would be able to configure ngrx-forms to put only the form properties in the store that you actually use (and have the rest as internals)? Perhaps this would take away some of the objections some people may have against this library. |
I don't think that bridge between ngrx and reactive forms will be enough, unless reactive forms undergo refactoring, which I doubt, reactive forms are clunky and not really that reactive. I get where they are coming from not wanting to keep form state in store, but at the same time I find it extremely useful most of the time. If you are using ngrx ecosystem (effects particularly), you are gonna have a problem doing even simple things such as resetting form state (and submitted state, which is not even stored in the I haven't worked with this lib nearly enough (started a new project few days ago, decided to give it a try) but I find it a little bit clunky, but it's a solid foundation, so I started writing abstractions around it, which so far worked fine. I'll try to give some relevant feedback once I've worked with it bit more. |
Surely this question has been raised before somewhere.
In my case I really want to use ngrx-forms in a few projects at the (big) company I work for. Most of us here would like to use it and see the benefits. But because this is not part of the official ngrx project it's being seen as too big of a risk to use it throughout all apps.
Are there or where there every any plans to make ngrx-forms part of the official ngrx project? And what is the current status of these plans?
Thanks for all your good work so far :)
The text was updated successfully, but these errors were encountered: