Fork me on GitHub
#cljsrn
<
2019-06-15
>
worlds-endless02:06:33

I'm confused by that example; without reactify-component, what is the (fn ...) bit receiving and re-destructuring?

worlds-endless02:06:39

Do all react components get passed props, and do all functions get interpreted as React components?

alex03:06:42

Is anyone using Firebase for auth but another SQL database as their application data store? Is that a common setup?

worlds-endless04:06:09

Why are these not equivalent -- why do I need the aset version to get my title to display?

worlds-endless04:06:29

In other words, why do I need the aset ... "navigationOptions" even after I've done assoc "navigationOptions"?

Oliver George06:06:26

react-nativation requires some pretty intrusive interop doesn't it. I decided not to fight it. Each screen has a def which looks something like this...

(def screen
  (doto (r/reactify-component container)
    (gobj/set "navigationOptions"
              #js {:headerTitle "Log a sighting"
                   :headerLeft  (r/as-element [rn/button {:title "Cancel" :onPress #(rf/dispatch [:sighting/method-cancel])}])
                   :headerRight (r/as-element [rn/button {:title "Done" :onPress #(rf/dispatch [:sighting-method/press-done])}])})))

👍 4
worlds-endless14:06:01

Is the container that you're reactifying just a hiccup form around a view or some such?

xfyre09:06:33

I solved this the other way around (I’m using NativeBase):

👍 4
xfyre09:06:58

and I’m passing {:header nil :headerMode "none"} to navigationOptions, so react-navigation doesn’t try to create them automatically

xfyre09:06:08

this gives finer level of control

dotemacs12:06:00

Added mercury-app’s wiki link to the groups subject line

worlds-endless16:06:15

I need to create a button within the header-bar which will have an onPress from the React docs like this.props.navigation.Navigate("Settings"). But I can't for the life of me figure out how to wrap/call it in such a ways that (settings-button) has access to this.props...

worlds-endless16:06:44

If I reactify a component I can get at the props, but at the moment I've got the header-bar working by doing gobj/set reactified "NavigationOptions" so they don't share that context

worlds-endless16:06:51

So I could easily put a button within my view which would Navigate to another view, but from within the view I can't change the header bar, and from within the header bar I can't Navigate...

worlds-endless19:06:46

I guess the question comes down to simply, "Now that I can put stuff in my header-bar, how do I put stuff that links to another page?"

worlds-endless19:06:01

How to convert this (esp. the static thing) into cljs?

alex02:06:28

See Oliver George's response above. That seems to work for me

worlds-endless23:06:23

(or, is there some other way to do a navigate() from the header bar?)