Hacker News new | ask | show | jobs
by marcosdumay 1798 days ago
Hum... Your new function reads all the checks, calculate the new values and enabled conditions, and applies them. It's called by the onChange of all of the relevant elements.

Reactive frameworks do make your life simpler (at least once you pay for the large one time cost of using them), but the change isn't enormous.

1 comments

Or you just use React and it has that function already built for you...

All you need to do is call setState

You certainly doesn't mean that React has your business rules builtin.
No, but it'll deal with changing the UI depending on your state once you've wired the rules in.