Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document way of forcing a re-render #152

Open
orestis opened this issue Jan 2, 2019 · 1 comment
Open

Document way of forcing a re-render #152

orestis opened this issue Jan 2, 2019 · 1 comment

Comments

@orestis
Copy link

orestis commented Jan 2, 2019

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
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants