This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-28
Channels
- # aws (7)
- # beginners (69)
- # boot (67)
- # cider (9)
- # cljs-dev (159)
- # cljsrn (2)
- # clojars (25)
- # clojure (345)
- # clojure-austin (9)
- # clojure-berlin (1)
- # clojure-dusseldorf (10)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-spec (73)
- # clojure-uk (59)
- # clojurescript (163)
- # clojurewerkz (1)
- # component (26)
- # core-matrix (2)
- # cursive (20)
- # datascript (32)
- # datomic (15)
- # dirac (16)
- # emacs (3)
- # hoplon (35)
- # jobs-discuss (87)
- # jobs-rus (95)
- # luminus (15)
- # om (135)
- # om-next (3)
- # onyx (47)
- # pedestal (67)
- # perun (74)
- # play-clj (4)
- # portland-or (1)
- # proton (4)
- # re-frame (13)
- # reagent (18)
- # remote-jobs (17)
- # rum (20)
- # specter (11)
- # untangled (101)
- # yada (18)
@pesterhazy thank you
how does one access the componen's local state
:component-did-mount (fn [this]
(r/set-state this {:some "state"}))
:reagent-render (fn [this] [:p (str (r/state this))])
a simplification here, but I get an error from this action r/state.this works
:component-did-mount (fn [this]
(r/set-state this {:some "state"}))
:reagent-render (fn [this] [:p (str (r/state (r/current-component)))])
weirdNot weird
Render doesn't get the comp passed as the first argument
It gets the first prop
:render
takes this
as argument and :reagent-render
the arguments passed to the component
Hello. Am i right that with with-let
you can get only initial component arguments values? I suppose i can combine with-let
with returning function but is it intended usage?
@juhoteperi wow you're right: http://app.klipse.tech/?container=1&cljs_in.gist=pesterhazy/c7cbe8b6ac206080512907d3da35f7da
I never knew. That is a weird API
the docstring is right 🙂
Trust but verify 😉
Btw. if using :render
the properties are available using reagent.core/props
props being the first argument to function, children
returns the list of rest of arguments
right
I think that's only true if the first argument is a map btw
otherwise everything is availaible as r/argv