Fork me on GitHub
#cljsrn
<
2016-02-04
>
mjmeintjes01:02:40

@adamfrey: It looks like the problem is with your host names. In the example app, either edit the build.boot and change "localhost" to the ip/hostname of your development computer, OR run adb reverse tcp:8079 tcp:8079 and ensure the hostname is "localhost". Hope that helps.

mjmeintjes01:02:19

We'll have to update to docs to make that clearer.

adamfrey01:02:44

thanks! I’ll check it out tomorrow

adamfrey02:02:28

@mjmeintjes hey, while you're online: I added the android logging task to dev, but I got no logs in the output. I rebuilt it and changed thr conch adb call to just be utils/sh like the ios one and then it worked. I didn't investigate it to figure out why. Does the android lover work for you?

mjmeintjes03:02:45

@adamfrey: That's strange, as it worked for me. If you can submit a pull request with your changes, I'm happy to test it out and merge.

pesterhazy07:02:05

@adamfrey: you can try accessing the port from safari on the device (websocket is built on http)

seantempesta14:02:07

Are there any examples for handling image resources in react native from clojurescript? Looking at luno it looks like all of the images are base64 inlines?

artemyarulin16:02:01

re-natal now support images using require calls, at least this is how RN manages it my itself

artemyarulin16:02:10

you have to register them first though

seantempesta16:02:01

@artemyarulin: Oh, I see. Is this reagent/re-frame specific or can I use this with om.next?

artemyarulin16:02:24

I mean - nope, it’s not related to reagent, you can use it with om/next simple_smile

seantempesta16:02:18

cool. thanks, I’ll check it out. Have you considered adding an om.next template? I know it doesn’t make sense for the “re-“ name, but it seems like you’re doing quite a few different things from natal.

seantempesta16:02:40

(and better IMHO)

artemyarulin16:02:25

@seantempesta: well, there is an issue https://github.com/drapanjanas/re-natal/issues/15 so it will I guess eventually will support om-next. I have already a template https://github.com/artemyarulin/om-next-cross-platform-template which really just a raw material Currently I’m into cross-platform development and making re-re-natal with set of additional helpers doesn’t make any sense, indeed. Rather than that I’m trying to marry Clojure and Buck build system which would handle much more than this

seantempesta16:02:32

@artemyarulin: I hear ya. Natal seems like the newbie friendly way to quickly get up and running with clojurescript and react native, but it feels very brittle (do people who use it really never make any mistakes?). However, when I looked into your om-next-cross-platform-template it just confused me. I think because you complect the cross platform stuff with using om-next.

artemyarulin16:02:23

Indeed, cross platform makes thing more complicated - not that many people actually looking for that

artemyarulin16:02:29

Well, if I would have the same goal and vision as re-natal - I wouldn’t make a new one 😄

seantempesta16:02:53

ha. good point. simple_smile

adamfrey20:02:04

I want to use the react-native-video library: https://github.com/brentvatne/react-native-video I have the package in my node_modules directory, and I can get the file I want when I curl the RN packager running on port 8081. But when I try to use:

(js/require "react-native-video/Video.js”)
in my CLJS I get the error:
Error: Requiring unknown module "react-native-video/Video.js”.
Should I be able to use js/require with another library the same way we do with js/React?

alwx21:02:35

hey try something like that

(set js/Video (js/require "react-native-video"))
and then:
(def video (r/adapt-react-class js/Video))
or
(def video (r/adapt-react-class (.-Video js/Video)))

alwx21:02:27

if you use re-natal, don't forget to add your component to .re-natal by running

re-natal use-component react-native-video

adamfrey21:02:37

my problem is with the

(js/require "react-native-video”)

adamfrey21:02:18

it fails with Requiring unknown module. I’m using react-native-boot, so my setup is a little different than yours. I’m investigating

alwx21:02:40

try to re-run packager

adamfrey21:02:18

I tried that, but no luck. I can get the file I want from the packager with curl, so I know it’s in the right place:

curl localhost:8081/node_modules/react-native-video/Video.js
I don’t understand how RN’s require statement actually works.