Fork me on GitHub
#cljsrn
<
2016-02-05
>
mjmeintjes00:02:56

@adamfrey: I haven't had any problems in the past using RN modules. What I usually do: (1) Add dependency to package.json in the app directory - i.e. the same file that has the dependency on react native. (2) npm install. Then (3) in cljs file I do (aset js/global JS-NAME (js/require LIB-NAME)). Another way to diagnose is to check your and ensure that the required files are included.

adamfrey14:02:07

@mjmeintjes: I found out this morning while playing around that I was only seeing the Requiring unknown module error after a boot reload, but the (js/require “react-native-video) worked fine the first time. So I ended up with

(defonce react-video (js/require "react-native-video"))
and it works. I don’t have a theory on why reload would be breaking the requires I added.

mjmeintjes22:02:12

@adamfrey: Thanks for the info.