cljfx

https://github.com/cljfx/cljfx
jlmr 2019-12-28T16:20:30.004400Z

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?

jlmr 2019-12-28T16:21:15.005200Z

Specifically what function should I write in the add-watch to update the *context

vlaaad 2019-12-28T21:31:31.006100Z

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?

vlaaad 2019-12-28T21:34:12.008400Z

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

vlaaad 2019-12-28T21:35:10.008500Z

cool, glad to hear that! what kind of full-fledged examples are you interested in?