This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-08
Channels
- # atlanta-clojurians (1)
- # beginners (116)
- # cider (70)
- # cljs-dev (11)
- # cljsrn (2)
- # clojure (218)
- # clojure-italy (7)
- # clojure-nl (14)
- # clojure-nlp (11)
- # clojure-spec (8)
- # clojure-uk (113)
- # clojurescript (86)
- # core-async (14)
- # cursive (24)
- # datomic (64)
- # duct (1)
- # emacs (3)
- # fulcro (20)
- # graphql (10)
- # jobs-rus (1)
- # london-clojurians (1)
- # luminus (1)
- # nyc (1)
- # off-topic (24)
- # onyx (1)
- # parinfer (1)
- # pedestal (14)
- # portkey (11)
- # re-frame (36)
- # reagent (9)
- # reitit (5)
- # ring (1)
- # shadow-cljs (197)
- # spacemacs (21)
- # specter (22)
- # sql (15)
- # tools-deps (5)
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
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]
I can see in devtools that this got translated to <clr-icon shape="home" size="24"></clr-icon>
which is correct
hmm nevermind. must've been a caching issue, because after a few reloads it suddenly started showing. weird.
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?
I never tried (as I am using re-frame's subscriptions), but reaction
should probably work: http://blog.ducky.io/reagent-docs/0.6.0-alpha2/reagent.ratom.html#var-reaction. Here's an example: https://github.com/Day8/re-frame/blob/master/docs/SubscriptionFlow.md#reg-sub-raw
Try r/track