This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-12
Channels
- # beginners (34)
- # boot (210)
- # cider (16)
- # cljs-dev (65)
- # cljsrn (3)
- # clojars (2)
- # clojure (107)
- # clojure-austin (8)
- # clojure-berlin (10)
- # clojure-brasil (1)
- # clojure-canada (1)
- # clojure-dev (1)
- # clojure-fr (1)
- # clojure-italy (22)
- # clojure-new-zealand (12)
- # clojure-nl (28)
- # clojure-russia (13)
- # clojure-spec (25)
- # clojure-uk (10)
- # clojurescript (109)
- # cursive (18)
- # datomic (44)
- # defnpodcast (1)
- # dirac (4)
- # emacs (2)
- # funcool (1)
- # hoplon (16)
- # jobs (14)
- # lambdaisland (23)
- # leiningen (2)
- # luminus (3)
- # off-topic (7)
- # om (58)
- # onyx (16)
- # proton (6)
- # re-frame (42)
- # reagent (55)
- # ring-swagger (5)
- # untangled (47)
- # vim (9)
@pvinis: I have this:
(`camelify-map-keys` is from reagent.impl.component
)
(def alert (fn [{:keys [title message buttons]}]
(.alert (.-Alert react-native)
(str title)
message (clj->js (mapv camelify-map-keys buttons)))))
The input then looks like this:
{:text "Text"
:message "Message"
:buttons [{:text "Cancel"
:style "cancel"}
{:text "OK"
:fn/on-press
#(dispatch [:alert/ok])}]}
@misha great. i completely forgot about the multiple arity functions in clj. @vikeri i was about to ask that. how can i write on-press
and not break js stuff. great!
@pesterhazy since some people already have the experience with build android release with boot-react-native, the steps should be added in the document.