Fork me on GitHub

@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:;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:

👍 4