Fork me on GitHub
#cljsrn
<
2016-03-15
>
mfikes00:03:58

@aiba: FWIW, with Ambly, compilation occurs on your computer.

aiba00:03:58

Oh, thank you for that clarification!

seantempesta02:03:30

@aiba: re-natal has a nice mechanism for requiring packages and images (“re-natal use-component” & just put your images in the ./images directory and they’ll be pulled into your project)

aiba06:03:56

@seantempesta: thanks that's helpful to know about.

aiba06:03:28

I'm going to try the re-natal route, but I'm very interested to know about the differences between these three systems. I'd love e.g. some kind of information on http://cljsrn.org that helps guide people to the right choice for them. (I'd offer a PR but I don't feel I understand the differences well enough.)

mj_langford06:03:17

are you doing more than iOS @aiba

aiba06:03:35

at the moment just ios but of course it would be nice to have a path to android if i happen to build something worthwhile

mfikes06:03:32

Yeah, any http://cljsrn.org PRs that elaborate on the differences would be welcome simple_smile

artemyarulin06:03:38

I would suggest re-natal as I guess it’s the most popular solution, meaning a lot of edge cases are handled. Another good candidate would be boot-react-native, as it actually uses RN packager and avoid many issues and hacks that re-natal does (figwheel-react-native actually).

aiba07:03:10

@mfikes: cool, i'll think about such a PR. i spent most of today playing with natal, re-natal, and boot-react-native so i might be in a good position to offer some perspective on the differences.

aiba07:03:01

@artemyarulin: thank you, yes in my playing around, re-natal worked best out of the box, seems most actively developed, supports RN 0.21 (vs boot-react-native's 0.20), had no weird chrome errors in the chrome debugger, and the dev reload time after editing a file is impressively instantaneous

artemyarulin07:03:13

yep, good choice - in this chat many folks are using re-natal, so likely you would get some response here

aiba07:03:32

I was initially scared off by all the files created by re-natal init FutureApp

aiba07:03:53

but now i'm seeing how they all work together and i get why that's all necessary

adamfrey14:03:29

Has anyone using boot-react-native been able to require images using js/require? I think something might need adjusted in boot-react-native, but I wanted to ask before I dive in. @mjmeintjes

mfikes15:03:21

@aiba: @artemyarulin: Yes, re-natal is likely more appropriate for a lot of people at this point. I’d revise things to list it first on http://cljsrn.org, remove the bit about it being a fork of natal, and just have the page describe what things are.

aiba19:03:42

@mfikes: yes I think that's a great idea. I still don't know whether there are good reasons a newcomer might choose to use natal or boot-react-native. If there are, http://cljsrn.org could explain those reasons. If not, maybe just straightforwardly explain/advise that re-natal is the way to go?

pesterhazy20:03:12

Holy moly, the react-native packager is buggy has hell (at least as of version 0.19)

seantempesta20:03:25

ha, I’ve heard that

pesterhazy20:03:46

Has anyone else had trouble with spurious "requiring unknown module" errors?

pesterhazy20:03:11

I'm having trouble especially when building offline bundles (main.jsbundle).

pesterhazy21:03:37

also the packager doesn't seem to always pick up requires from cljs-transpiled files

adamfrey21:03:16

@pesterhazy: Yeah, I also can’t get the packager to pick up static image requires. I’m wading through the source code, but it’s a deep dive

pesterhazy21:03:59

@adamfrey: assets usually work for me, until suddenly they don't

adamfrey21:03:34

with boot-react-native? For me they consistently never show up in my bundle

pesterhazy21:03:20

@adamfrey: in the offline bundle or in dev mode?

pesterhazy21:03:45

it should work, but you need to get the paths right

pesterhazy21:03:11

it needs to be in the app subfolder (where node_modules also is)

adamfrey21:03:04

yeah, I have my images in app/img/file.png and then I do (js/require “./img/file.png) and it doesn’t find it

pesterhazy21:03:07

remember, no symlinks, they don't work

pesterhazy21:03:09

might be useful to add images to the SimpleExampleApp in boot-react-native

pesterhazy21:03:19

so people can copy a config that works

adamfrey21:03:51

yeah definitely that would be helpful.