This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-06
Channels
- # admin-announcements (2)
- # aws (3)
- # beginners (25)
- # boot (7)
- # cider (27)
- # cljs-dev (30)
- # clojure (106)
- # clojure-boston (1)
- # clojure-czech (3)
- # clojure-dev (3)
- # clojure-estonia (1)
- # clojure-italy (1)
- # clojure-russia (11)
- # clojure-uk (3)
- # clojurescript (83)
- # clojurex (1)
- # datascript (1)
- # datomic (21)
- # docs (7)
- # funcool (1)
- # hoplon (8)
- # jobs (2)
- # ldnclj (9)
- # leiningen (6)
- # om (6)
- # onyx (29)
- # re-frame (41)
- # reagent (64)
- # spacemacs (2)
- # test200 (1)
Reagent demo page for devcards: http://rigsomelight.com/devcards/#!/devdemos.reagent
@gadfly361: so cool!
I just ported over some react-motion demos over to reagent: https://ducky427.github.io/reagent-motion-demos
something like [(pass 1 my-component) 2 3]
where (defn my-component [a b c] [:p (str a b c)])
perhaps it’s something like (defn pass [x f] (r/create-class {:reagent-render (fn [& args] (apply f x args))})
?
the above is cute but won’t work because it destroys the meta that might already be on the passed function
what I ultimately want to do is to be able to write components like [:div [:p “foo bar”] [(with-ctx :kw f)]]
i thought my-component
is a reagent component. but you seem to suggest that its a closer to a function. [i hope i got it this time]
at the moment I’ve written it as though it’s a function intended to be interpreted as a component
ok. i am assuming that you’ve seen https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components#form-3-a-class-with-life-cycle-methods
is there perhaps a way to ensure that a given “component like” thing is forced to class map form?
a stupid question: could my-component be re-written as (defn my-component [a] (fn [b c] [:p (str a b c)]))
looks like it’s here https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/template.cljs#L199
huh, looks like the way the whole shebang works is that props is passed {:argv …}
where argv are the arguments from the vector syntax
@rohit those react-motion demos look good !