This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-25
Channels
- # arachne (1)
- # beginners (22)
- # boot (21)
- # cider (23)
- # cljs-dev (16)
- # cljsrn (9)
- # clojure (118)
- # clojure-dev (11)
- # clojure-greece (16)
- # clojure-italy (10)
- # clojure-losangeles (4)
- # clojure-russia (14)
- # clojure-serbia (4)
- # clojure-spec (58)
- # clojure-uk (33)
- # clojurescript (30)
- # cursive (17)
- # datomic (48)
- # docs (22)
- # events (1)
- # fulcro (24)
- # hoplon (3)
- # jobs (6)
- # jobs-discuss (4)
- # keechma (4)
- # leiningen (11)
- # luminus (4)
- # midje (1)
- # off-topic (107)
- # onyx (30)
- # other-languages (12)
- # pedestal (4)
- # re-frame (72)
- # reagent (6)
- # remote-jobs (1)
- # shadow-cljs (16)
- # spacemacs (3)
- # specter (9)
- # uncomplicate (4)
- # unrepl (40)
@deg check out https://github.com/status-im/status-react. It's quite a complex app built with re-natal and re-frame
Hi all! who knows how to use react-native-push-notifiction
? I would like to open a specific screen when the user click on a notification.. works fine on ios but not on android (same code). Do you know how to handle it? Thx 🙂
How do I show a list component (FlatList or Picker, or anything similar)? My attempts are all displaying as whitespace. I looked at the code in status-react, but even once I dragged in a pile of their support functions, I still got nothing. I assume that I'm either missing some attribute or I'm hitting some js/cljs data conversion problem, but I don't yet have the tools to know how to debug this.
@deg I'm also new to this, but I got both flat-list and picker to work. The picker looked something like this
(def picker (partial create-element (.-Picker ReactNative)))
(def picker-item (partial create-element (.. ReactNative -Picker -Item)))
(picker {}
(picker-item {:label "hej"})
(picker-item {:label "hopp"}))
But, still not working..
First, it complained that {:label ..
and {}
were not js objects. Even once I wrapped them, I just returned to my status quo: displaying blank white space.
I finally got something working! Found code in https://gist.github.com/escherize/86e7da7984dca037a930, from https://clojurians-log.clojureverse.org/cljsrn/2016-03-16.html. Now splitting the differences, to see what my problem was, but guessing that I needed to specify width and height styles.
Yeah, that was it, plus I had a whole pile of jumbled syntax (I'd passed in a vector of items, rather than having them at top-level; I had :on-change
instead of :on-value-change
, etc.).
Here's what does work:
(def picker (r/adapt-react-class (.-Picker ReactNative)))
(def picker-item (r/adapt-react-class (.-Item (.-Picker ReactNative))))
...
[picker {:style {:width 350 :height 50 :margin 10}
:selected-value :b
:on-value-change #(js/alert "Kilroy")}
[picker-item {:value :a :label "Alabama"}]
[picker-item {:value :b :label "Baltimore"}]
[picker-item {:value :c :label "Canada"}]]