bhauman / devcards

Devcards aims to provide a visual REPL experience for ClojureScript
1.53k stars 116 forks source link

Document way of forcing a re-render #152

Open orestis opened 5 years ago

orestis commented 5 years ago

Thanks for devcards! It's been very helpful in demoing the power of ClojureScript :)

I'm using Shadow-CLJS, and I couldn't find a way to force dev-cards to be re-rendered upon a hot-code reload event. I see my code been reloaded, but calling (dc/start-devcard-ui!) doesn't update the interface.

I've found the workaround of calling (devcards.system/renderer @devcards.system/app-state) after the hot-code reload and this seems to do the trick. I wonder if this should be documented or be made official, as I'm not sure if this is supposed to be public API or not.

Thanks again, and happy new year!

khmelevskii commented 5 years ago

Hi @orestis! I have the same problem, but unfortunately your decision doesn't work for me. I added (devcards.system/renderer @devcards.system/app-state) to after-load shadow-cljs hook. Can you explain more details how you fixed this problem?