Hi everyone, Is there a way to refresh the scene every time one of my "components" gets re-evaluated? I was looking for a way to do this with nrepl and cider. More details here: https://clojurians.slack.com/archives/C17JYSA3H/p1632594201013200 Thanks
You could have a save hook in your editor that issues the right command, that’s what I mostly do. That said, I often find just resizing the window is convenient enough to trigger a redraw.
You have your state atom somewhere, call (swap! the-atom identity)
You can probably setup your editor to send this form on some keystroke
Hi @vlaaad , Thank you very much for you support. Refreshing the scene when the state changes is working as expected. My challenge is to refreshing the scene when the one of the component (functions) gets updated via repl.
Currently I have to run the renderer function every time one of the components changes.
(def renderer
(fx/create-renderer
:middleware (fx/wrap-map-desc (fn [state]
{:fx/type root-view
:state state}))
:opts {:fx.opt/map-event-handler event-handler}))