by throwaway_n · 7y ago · 0 comments
I think your example is exactly why stuff like React won vs data-binding frameworks. With declarative programming, you just have a single source of truth that you change once (you can arbitrarily pick celsius or fahrenheit or even kelvin) and let the framework figure out what needs to be diff-ed in the derived views.
(The examples here are for buttons and sliders, but it's the same syntax for input fields)
They weren’t beautiful, but both methods worked fine for the rare cases they proved necessary.