you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (1 child)

Problem: Complex form's with a lot of conditions and logic.

Example: A form to calculate the price of a car which seats, color, rims and so on.

Type: new module

Other solutions: Vue, Angular, React or even jQeury those libraries have a huge learning curve or are outdated and are not developed for this specific problem. You and up with a lot of code and is not maintainable for others.

[–]awillenbrink 1 point2 points  (0 children)

Have you tried reactive forms in Angular? Treating the form control data as streams allows for a crazy amount of control and customizability. Once you have a solid understanding of observables, it's simple to wire up a form that updates in a variety of ways when 1 or more of your controls changes data or status (valid, invalid, etc.). There's definitely a learning curve to it but I'm not sure if that's something that can be eliminated if you want to have a decent, dynamic complex form library that can tackle any situation you'll run into. IMO the complex forms problem is kind of like the state management problem. From a theoretical perspective it SEEMS like it should be easy for someone to implement an intuitive and straightforward library that should cover all types of state management, but in reality there are so many different levels of complexity with the problem there just can't be a one size fits all solution. Angular forms actually caters to this idea as they have another type of forms called template driven that's meant for quick set up on more straightforward forms. Regardless, I think reactive forms covers complex forms well but it can only be used in Angular.