ah, I can't wait to finish writing the docs, it's turning out so nice
so many interesting possibilities
I made a little demo that uses integrant to build a simple server, and it's state is managed in an agent
using very little code, I can make a monitor of that system that both shows it's state and contains controls to start it and stop it
e.g.:
(re/viewed-as-is
{:fx/type re/observable-view
:ref system
:fn (fn [state]
{:fx/type :v-box
:children [{:fx/type re/value-view
:v-box/vgrow :always
:value state}
{:fx/type :h-box
:children [{:fx/type :button
:disable (not state)
:text "Stop"
:on-action (fn [_] (stop!))}
{:fx/type :button
:disable (some? state)
:text "Start"
:on-action (fn [_] (start!))}]}]})})
And here is how it can be viewed: note that it displays both the state and buttons to start/stop it
and whenever the system is started/stopped from the repl, this view is immediately updated
"build your own watcher"