This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-28
Channels
- # announcements (11)
- # aws (30)
- # beginners (98)
- # calva (11)
- # cider (42)
- # clj-kondo (4)
- # cljdoc (1)
- # cljsrn (5)
- # clojure (132)
- # clojure-europe (4)
- # clojure-ireland (1)
- # clojure-italy (35)
- # clojure-japan (2)
- # clojure-nl (5)
- # clojure-spec (5)
- # clojure-uk (24)
- # clojurescript (71)
- # clojutre (1)
- # core-async (6)
- # cursive (9)
- # data-science (4)
- # datascript (3)
- # datomic (78)
- # duct (16)
- # emacs (14)
- # events (2)
- # fulcro (141)
- # graalvm (5)
- # hoplon (14)
- # hyperfiddle (2)
- # jobs-discuss (14)
- # joker (8)
- # luminus (2)
- # off-topic (7)
- # om (1)
- # pathom (4)
- # pedestal (7)
- # planck (2)
- # quil (1)
- # re-frame (14)
- # reagent (2)
- # reitit (14)
- # robots (1)
- # shadow-cljs (20)
- # spacemacs (25)
- # specter (1)
- # sql (122)
- # tools-deps (63)
- # unrepl (2)
- # yada (34)
@manu very basic approach:
(defonce NativeBase (js/require "native-base"))
; that's for a component
(defonce button (r/adapt-react-class (.-Button NativeBase)))
; that's for a function
(defonce Toast (.-Toast NativeBase))
(defn show-toast [args] (.show Toast (clj->js args)))
@xfyre I think the issue here is not just that he needs to get the components, but that native base needs to run additional steps, which create native-base-theme
directory in the root of the repo, which you’re meant to require additionally to just getting the components. See: https://clojurians.slack.com/archives/C0E1SN0NM/p1558989581017400?thread_ts=1558955085.015100&cid=C0E1SN0NM
@dotemacs have you really successfully required both ./native-base-theme/components
and ./native-base-theme/variables/platform.js
to set the style of StyleProvider
? In my understanding those native-base stuff use some ES9 features and unless I'm outdated cljs is not able per se of requiring them.
I did get get-theme
required from what I quoted above, but I didn’t get variables directory required and figured since I’m not using this library, why spend time on it… I didn’t know about this limitation regarding ES9 features… Thanks
You're welcome. Here is an hint, if someone needs it: https://clojurescript.org/guides/javascript-modules#custom-transforms