This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-07
Channels
- # admin-announcements (4)
- # beginners (63)
- # boot (67)
- # clara (29)
- # cljs-dev (38)
- # cljsjs (10)
- # clojars (7)
- # clojure (336)
- # clojure-belgium (3)
- # clojure-dev (22)
- # clojure-greece (30)
- # clojure-nl (1)
- # clojure-russia (9)
- # clojure-spain (3)
- # clojure-spec (169)
- # clojure-uk (12)
- # clojurescript (45)
- # clojurex (4)
- # core-matrix (3)
- # cursive (58)
- # datascript (3)
- # datomic (18)
- # events (38)
- # hoplon (228)
- # immutant (5)
- # lambdaisland (6)
- # leiningen (3)
- # luminus (8)
- # off-topic (11)
- # om (113)
- # om-next (2)
- # onyx (10)
- # parinfer (7)
- # planck (22)
- # re-frame (11)
- # reagent (25)
- # robots (7)
- # spacemacs (3)
- # specter (10)
- # yada (3)
hi, is it possible to pass a component as a parameter to another component? the idea is to have main template, and everytime route change, you just need to change the content area
like [main-template child-view], child-view could be a form-2 component, like returning a function of rendering hiccups.
Yeah it's possible: http://cljsfiddle.com/#gist=369b39af453aa3c97f3373d18fee866f
@escherize: I'm not seeing the gist get loaded (Chrome, Windows)
Oh, yeah
@escherize if child component is form 2 component, returning a rendering fn, will it work?
@rui.yang: do you mean like this: http://cljsfiddle.com/#gist=ce36e8876d636b81b673c7079b0b5582
yes, very close. can child accept parameter? sorry, on the way home and no access to my laptop to try it myself
can someone help me with an atom issue? trying to clear a text input in an ajax callback, but the input element’s value stays the same, even after i clear the atom it reads the value from. i can post some code to clarify if needed
i checked to make sure the value of the atom is correct both before and after it is reset (in the :handler of the ajax call)
it seems like the input element isn’t being re-rendered after the handler updates the atom
Not near a computer, but I don't see anything wrong at first glance... Hopefully someone else can spot the issue! (I never use reset and always use swap on an atom and a hash-map. Can't imagine why that'd make a difference tho.)
@dilin should it be :val
or :value
?
what is the relationship between arguments to a Reagent component and React props?
If I say (defn some-reagent-component [props])
and pass it a map, do those get turned into real React props?
or if I say (defn some-reagent-component [x y z])
do those arguments get stored as props at all?
I think I should look here 🙂 https://github.com/reagent-project/reagent/blob/master/src/reagent/core.cljs
the source is great