This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-17
Channels
- # architecture (115)
- # asami (64)
- # aws (2)
- # babashka (65)
- # beginners (91)
- # calva (21)
- # clara (3)
- # cljdoc (5)
- # cljsrn (1)
- # clojure (331)
- # clojure-australia (15)
- # clojure-europe (16)
- # clojure-italy (7)
- # clojure-nl (8)
- # clojure-uk (10)
- # clojurescript (10)
- # conjure (4)
- # core-typed (6)
- # cryogen (12)
- # data-science (1)
- # datomic (9)
- # depstar (2)
- # emacs (1)
- # events (1)
- # figwheel-main (1)
- # fulcro (2)
- # graalvm (9)
- # helix (4)
- # java (45)
- # kaocha (4)
- # malli (14)
- # meander (4)
- # membrane (34)
- # mid-cities-meetup (6)
- # pedestal (3)
- # re-frame (7)
- # reitit (4)
- # shadow-cljs (4)
- # spacemacs (5)
- # sql (29)
- # tools-deps (22)
I shared this in the re-frame channel but I thought I'd share it here too, half in case it's useful to anyone else, and half in case someone can point out some flaws: https://gist.github.com/tomconnors/bd3fb275f893a3f16295c2ca93a32b2d - it's an implementation of use-sub
for using re-frame subs as react hooks.
Hi, why is ^:native
is causing Error: [object Object] is not ISeqable
when I'm accessing the (.-button theme)
but not when using keyword (:button theme)
... Then why removing ^:native metadata and accessing (.-button theme)
works?
value of theme #js {:button #js {:color #6b46c1}, :input #js {:color #4a5568, :borderColor #cbd5e0, :borderWidth 1, :height 40}}
(defnc button [{:keys [on-press data-testid title color]}]
(let [theme (useTheme)]
(println "theme " theme)
($ rn/Button {:style (.-button theme) <------------ seems like (.-button theme) causes error when adding ^:native
:color (.. theme -button -color)
:title title
:on-press on-press
:data-testid data-testid})))