This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-22
Channels
- # aws-lambda (2)
- # beginners (195)
- # boot (47)
- # capetown (14)
- # cljs-dev (7)
- # cljsjs (1)
- # cljsrn (1)
- # clojure (103)
- # clojure-berlin (28)
- # clojure-dev (92)
- # clojure-dusseldorf (3)
- # clojure-finland (2)
- # clojure-germany (3)
- # clojure-italy (4)
- # clojure-russia (37)
- # clojure-spec (104)
- # clojure-uk (52)
- # clojured (2)
- # clojurescript (124)
- # community-development (7)
- # core-async (6)
- # cursive (41)
- # datomic (53)
- # dirac (2)
- # emacs (16)
- # hoplon (5)
- # jobs (3)
- # juxt (12)
- # lein-figwheel (6)
- # leiningen (15)
- # luminus (3)
- # off-topic (49)
- # om (5)
- # onyx (13)
- # overtone (27)
- # re-frame (7)
- # reagent (46)
- # ring (3)
- # ring-swagger (11)
- # spacemacs (2)
- # specter (40)
- # sql (6)
- # untangled (149)
- # vim (14)
besides https://github.com/omcljs/om/wiki/Components%2C-Identity-%26-Normalization is there any tutorial on how to use om next ?
I find the wiki a bit too fast moving and looking for something that explains an app step by step
@qqq you might want to look at #untangled and the community resources at the bottom of the wiki: https://github.com/omcljs/om/wiki
@danielstockton : oh wow, untangled looks amazing
Hello all, a little question with om.next
on React Native (ios) using re-natal
I am following the documentation on Navigator https://facebook.github.io/react-native/docs/using-navigators.html#using-navigator
and I try to translate it to cljs
. This code is working for this example =>
(defui MyScene
Object
(render [this]
(let [{:keys [title onForward onBack]} (om/props this)]
(js/console.log (om/props this))
(view nil
(text {:style {:fontSize 20}} (str "Scene name is : " title))
(touchable-highlight {:onPress onForward}
(text nil "Tap me to load the next scene "))
(touchable-highlight {:onPress onBack}
(text nil "Tap me to Go back"))))))
(defonce my-scene (om/factory MyScene))
(def navigator (partial create-element (.-Navigator ReactNative)))
(defui AppRoot
static om/IQuery
(query [this]
'[:app/msg])
Object
(render [this]
(let [{:keys [app/msg]} (om/props this)]
(navigator
{:initialRoute {:title "My Initial Scene héhé"
:index 0}
:renderScene (fn [route, navigator]
(my-scene {:title (.-title route)
:onForward (fn []
(let [nextIndex (inc (.-index route))]
(.push navigator {:title (str "Scene " nextIndex)
:index nextIndex})))
:onBack (fn []
(if (pos? (.-index route))
(.pop navigator)))}))}))))
I am lost in making props required as in the example =>
MyScene.propTypes = {
title: PropTypes.string.isRequired,
onForward: PropTypes.func.isRequired,
onBack: PropTypes.func.isRequired,
};
any ideas on how to do it ?