This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-05
Channels
- # aws-lambda (1)
- # beginners (294)
- # boot (35)
- # cider (19)
- # cljs-dev (39)
- # cljsrn (7)
- # clojars (48)
- # clojure (266)
- # clojure-android (1)
- # clojure-brasil (1)
- # clojure-france (2)
- # clojure-greece (5)
- # clojure-italy (7)
- # clojure-mexico (1)
- # clojure-russia (24)
- # clojure-spec (10)
- # clojure-uk (31)
- # clojurescript (134)
- # consulting (7)
- # cursive (69)
- # datomic (20)
- # emacs (57)
- # events (2)
- # figwheel (2)
- # hoplon (1)
- # jobs-discuss (19)
- # luminus (33)
- # lumo (18)
- # mount (1)
- # off-topic (32)
- # om (5)
- # onyx (27)
- # pedestal (15)
- # re-frame (12)
- # reagent (28)
- # rum (2)
- # schema (2)
- # spacemacs (9)
- # unrepl (2)
- # untangled (7)
- # vim (5)
- # yada (4)
@manu you can capture the back button on Android in re-natal in the android/core.cljs file and then have it execute any function, which when it returns true tells Android not to handle the back itself. In my example I use it with re-frame to always dispatch a navigation pop event (which does nothing when at the top of the stack)
@amorokh I’m back to trying out your om-navigate, and it seems all the components lose access to the reconciler, preventing one from using om/get-query
and om/transact!
within the components. Are you doing anything special to recover this functionality?
@harrybin i did it thanks!! 😄 actually I tried using BackHandler since seems BackAndroid is deprecated (https://facebook.github.io/react-native/docs/backandroid.html) but backHandler is not working.
@levitanong I am not sure what u mean by components losing access to the reconciler but I haven't implemented anything more than the playground example, except for some small IQuery
stuff for some Components, haven't tried om/transact!
at all
amorokh:
(om/get-reconciler this)
returning the reconciler is a prerequisite for om/transact!
. Inside create-screen-proxy
, calling (om/get-reconciler this)
yields nil
because transform-routes
is converted to a javascript object via clj->js
. This results in the screen proxy losing the reference to the reconciler.
Ok I see, I will take a look at this as soon as I can (I am quite new to all this so I will certainly learn somethibg new)
I think the solution will be to reestablish bindings: https://github.com/hugoduncan/navigator-repro/blob/master/src/navigator_repro/macros.clj#L3 However I’m not entirely sure where to put it. I’ve tried a few places but I’m new to this too, and you’re probably best equipped to figure this out. 😉
amorokh:
(om/get-reconciler this)
returning the reconciler is a prerequisite for om/transact!
. Inside create-screen-proxy
, calling (om/get-reconciler this)
yields nil
because transform-routes
is converted to a javascript object via clj->js
. This results in the screen proxy losing the reference to the reconciler.
I think the solution will be to reestablish bindings: https://github.com/hugoduncan/navigator-repro/blob/master/src/navigator_repro/macros.clj#L3 However I’m not entirely sure where to put it. I’ve tried a few places but I’m new to this too, and you’re probably best equipped to figure this out. 😉