I'm a battle hardened developer, but new to Bootstrap/ Knockout/Flask etc. I have a button that I want to disable when the printer isn't ready (i.e. no connection, or it's printing).
So far I've implemented a timer that checks every second to see if there's a connection and what status the printer is in and then update an observable depending on the result. The observable is bound to then update the disabled state of the button.
Is this the best way to do it, on a timer? Or should I be watching for some kind of events/hooks and then I can just update when the state changes?