Hi, I’m experimenting (just a toy project for now) with cljfx and have created an app with fx/create-app
. How can I implement live reloading with https://github.com/cljfx/css in this case?
Specifically what function should I write in the add-watch
to update the *context
hi @jlmr! Did you have a look at example in cljfx/css at https://github.com/cljfx/css/blob/master/examples/e01_instant_restyling.clj#L116?
your *context
is an atom with context value in it, so code inside add-watch probably should look like this: (swap! *context fx/swap-context assoc :style style)
— that will put style to :style
key in a context