Fork me on GitHub
#cljsrn
<
2017-07-02
>
eric.shao13:07:16

@amorokh 😀 Thank you for your om-navigate lib.I am learning it.Can you teach me the meaning of render-screen function?Why clone?

amorokh09:07:22

I clone the element created by the om factory in order to add the navigation prop

amorokh09:07:09

Regarding your other questions, I have no idea 😊

eric.shao13:07:13

@amorokh Thank you for your rpl,somehow I didn’t see this message.😅

eric.shao13:07:08

@amorokh What are the main differences between web-tab and native-tab?

eric.shao13:07:15

@amorokh do you know Untangled?Can that experience be shifted to native-land?

gphilipp19:07:32

@raspasov out of curiosity, I create a fresh re-natal project with re-natal init FutureApp. I changed the compilation option of prod-build to :advanced and launched a ‘Release’ locally : lein clean && lein prod-build && react-native run-ios --configuration Release. It failed with this log: https://gist.github.com/gphilipp/9d5631c425abe438314f5f6cf026f692

pesterhazy19:07:56

@gphilipp the actual error is this

[error][tid:com.facebook.react.JavaScript] Assert failed: c

pesterhazy19:07:34

that's a reagent error if I'm not mistaken (though a terribly undescriptive one)

gphilipp20:07:03

Yes that's the error, I just don't know why using advanced compilation caused it.

pesterhazy20:07:41

probably a use of property access (.-foo bar)

pesterhazy20:07:23

you're probably using something like this:

(def react-native (js/require "react-native"))
(def view (r/adapt-react-class (.-View react-native)))

pesterhazy20:07:21

instead try using (r/adapt-react-class (gobj/get react-native "View"))

pesterhazy20:07:46

you'll need to replace all the uses of .- like this

pesterhazy20:07:02

the second option is to add an externs file for react native

pesterhazy20:07:17

the third option is to not use advanced compilation at all

paulbutcher21:07:46

Can someone help me understand why the starter project generated by re-natal duplicates the code in android/core.cljs and ios/core.cljs? The files are identical apart from the namespace as far as I can see? I would imagine that this code could be shared between iOS and Android? But perhaps there’s something I’m missing that means that it can’t be?

mfikes23:07:06

@gphilipp Setting up externs can be as easy as simply adding a dep in project.clj on https://github.com/artemyarulin/react-native-externs (it worked for my project)