Fork me on GitHub
#reagent
<
2018-06-08
>
bupkis07:06:32

has anyone managed to successfully use a web component (made via the @webcomponents/custom-elements NPM package) in a reagent app? I can see it in the DOM from Devtools but it isn't displaying

bupkis07:06:16

the component in question is VMware Clarity's clr-icon element. I'm including the clr-icon css in my html file, and from my CLJS file I've added the custom-elements and clr/icons javascript files in my require (i'm using shadow-cljs). then in the hiccup I have [:clr-icon {:shape :home :size 24]

bupkis07:06:46

I can see in devtools that this got translated to <clr-icon shape="home" size="24"></clr-icon> which is correct

bupkis07:06:56

but the icon doesn't show

bupkis07:06:51

hmm nevermind. must've been a caching issue, because after a few reloads it suddenly started showing. weird.

roti12:06:32

when using figwheel, and calling render from within on-js-reload (when the code was changed) the rendering does not happen, I suspect because the state has not changed. are solutions for this? can I force a rerender?

achikin20:06:07

Are there read-only cursors in reagent?