Fork me on GitHub
#cljsrn
<
2018-01-27
>
fabrao04:01:26

hello, is there anyone that used cljs-expo?

fabrao04:01:06

I´m begining of using it and how can I include an external lib installed from npm to use with require?

carocad11:01:24

@fabrao just do npm install lib-name --save and in your cljs code do (js/require "lib-name")

fabrao12:01:33

@carocad is there any other config to do? I tried this and seems not find module. Have you tried it in expo Project?

carocad12:01:49

yes I am using the expo template for cljs and that is my workflow. Obviously the library must be js only. No native code

fabrao12:01:15

So if I want to use react-native-voice Will not be possible ?

carocad20:01:39

I see that it has native code so no. Unfortunately that is the catch with Expo. If you want to use it directly you cannot use native code.

carocad20:01:18

I know that you can “detach” your project from Expo and then use native libraries but I would be wary of it since I dont think many cljs devs have done that

ferossgp13:01:20

Hello everyone, has someone made re-natal app with web version together from the same repository? I'm looking for a good solution to make different side effects based on platform web/mobile, the problem is that requiring namespace and based on variable to select what to do is not possible because rn didn't know about browser functionality and vice versa, it is possible to require them in cljs build with the same name in different places but I think that this can be confusing