Re:Settings are not a design failure
by freedomben on Thursday February 03, 2022 @02:04PM
(#30197084)
Yes I agree, although having gone through that several times in different frameworks, I am now a believer that you can avoid the majority of issues like that by keeping state centralized (like redux pattern) and building components in a functional-reactive way (no state in components). Of course this doesn't help much if you're using Java Swing, but the vast majority of products that I run into this are web-based. The "always re-render" approach of React can help a ton. With that you have two separate event handlers (one for the click, one for the key press) but both of them simply update the "state" variable for whatever it is. The framework then figures out what needs to change and does it.
[ Parent
| on HN ]
There are no comments on this comment yet.