Fork me on GitHub
#cljsrn
<
2019-11-05
>
gonewest81819:11:25

Hello all, I’m venturing into clojurescript and react native (via expo) for the first time, and for now, just trying to get my feet planted underneath me. I have been able to setup and run each of the following in a simulator with an attached repl: https://github.com/PEZ/rn-rf-shadow https://github.com/thheller/reagent-expo https://github.com/seantempesta/expo-cljs-template My question is, once I have the default app running, how do I require and use another expo package like “expo-battery” or “expo-device”?

thheller20:11:05

for anything that uses shadow-cljs just (:require ["expo-battery" :as foo]) (in the ns) and then use foo/whatever.

thheller20:11:13

after npm install expo-battery of course

gonewest81820:11:38

That’s what I thought, but in my case

Unable to resolve "expo-battery" from "app/index.js"
Failed building JavaScript bundle.

gonewest81821:11:12

Hold on, restarting the bundler.

gonewest81821:11:52

ok, restarting the bundler fixed that