Fork me on GitHub
#cljsrn
<
2019-06-14
>
worlds-endless00:06:58

ah! that got me through that thicket; I now get a map canvas that says "Google" on it. Thanks! Now back to their documentation to get an idea why there's nothing on the map...

lepistane08:06:34

@worlds-endless you need to make map be absolute position

worlds-endless12:06:12

Next task: customizing my header bar. But more generally, understanding when I'm in CLJS land and when I need to whip out :>, #js,`adapt-react-class`, etc...

worlds-endless13:06:45

Here, it says I should stick <Button...> jsx into NavigationOptions.HeaderRight. What's the cljs translation of this, given that I have a (def button (r/adapt-react-class (.-Button react-native))) ?

Alex13:06:46

I would try with (r/as-element [button ...])

Alex13:06:52

Ooh what did you use?

worlds-endless13:06:00

Exactly what I was about to say worked!

worlds-endless13:06:34

Just replaced reactify-component with as-element

worlds-endless13:06:03

in the header-right-component; only change, and now things are showing up

worlds-endless13:06:41

I guess reagent.core/as-element answers my question about how to translate examples where we stick jsx components into react-native options

worlds-endless14:06:59

Curious question for the channel -- how do you develop your cljsrn apps? I have an ANdroid Studio AVD, figwheel in emacs, and see what things do by going up to the AVD. I have no idea how to see a console or logs, etc.

worlds-endless14:06:18

Ah! that was new to me. I'm android on Firefox usually, but most of that looks like it should still apply

xfyre14:06:04

IntelliJ + Chrome debugger (sometimes RN debugger)

worlds-endless14:06:04

When you say Chrome debugger, what is that? Are you sending Chrome to some page that goes along with the AVD?

xfyre14:06:22

I’m looking for some hints about using RefreshControl. Basically it works, but there’s a problem: when you change its state to refreshing: true, it immediately triggers re-rendering of the component it’s attached to, thus resetting the state back. Did anyone have any luck properly solving this?

worlds-endless19:06:21

I have this function I don't completely understand, but I need to let-extract the function navigation.navigate() so I can pass it down the tree. Any suggestions how?

worlds-endless19:06:21

I see it's in the props that reactify-component seems to magically have access to, but I don't know how else to get at it?

worlds-endless19:06:50

what I want is like (let [press-fn #(.navigate navigation "TargetScreen"] ... )

joshmiller19:06:09

I think what you want to do is pull it from a separate function, like so:

(defn nav-wrapper
  [component title]
  (fn [{:keys [navigation]}]
    (let [{navigate :navigate} navigation]
      ;...
    )))