This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-15
Channels
- # announcements (2)
- # aws (1)
- # beginners (200)
- # calva (136)
- # cider (32)
- # clj-kondo (1)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (147)
- # clojure-argentina (1)
- # clojure-dev (144)
- # clojure-nl (2)
- # clojure-spec (14)
- # clojure-turkiye (1)
- # clojure-uk (1)
- # clojurescript (7)
- # data-science (1)
- # datomic (5)
- # duct (6)
- # figwheel (2)
- # fulcro (4)
- # graalvm (10)
- # graphql (1)
- # immutant (1)
- # joker (4)
- # off-topic (30)
- # om (1)
- # re-frame (11)
- # reagent (2)
- # reitit (4)
- # shadow-cljs (63)
- # testing (1)
- # tools-deps (7)
I'm confused by that example; without reactify-component
, what is the (fn ...) bit receiving and re-destructuring?
Do all react components get passed props
, and do all functions get interpreted as React components?
Is anyone using Firebase for auth but another SQL database as their application data store? Is that a common setup?
Why are these not equivalent -- why do I need the aset version to get my title to display?
In other words, why do I need the aset ... "navigationOptions"
even after I've done assoc "navigationOptions"
?
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])}])})))
Is the container
that you're reactifying just a hiccup form around a view
or some such?
Correct
and I’m passing {:header nil :headerMode "none"}
to navigationOptions, so react-navigation doesn’t try to create them automatically
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
...
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
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...
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?"
How to convert this (esp. the static thing) into cljs?
(or, is there some other way to do a navigate()
from the header bar?)