devcards icon indicating copy to clipboard operation
devcards copied to clipboard

Document way of forcing a re-render

Open orestis opened this issue 6 years ago • 1 comments

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!

orestis avatar Jan 02 '19 14:01 orestis

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?

khmelevskii avatar Jan 27 '19 21:01 khmelevskii