This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-06
Channels
- # beginners (20)
- # boot (221)
- # cider (16)
- # clojure (140)
- # clojure-berlin (2)
- # clojure-dev (2)
- # clojure-germany (2)
- # clojure-japan (4)
- # clojure-korea (44)
- # clojure-russia (2)
- # clojure-uk (6)
- # clojurescript (202)
- # core-async (7)
- # datomic (9)
- # editors (1)
- # euroclojure (3)
- # ldnclj (21)
- # liberator (4)
- # off-topic (4)
- # om (8)
- # reagent (17)
Why were you getting Invalid Arity: 1
? Inquiring minds want to know!
I was calling the [:div] function (... function? macro? jargonjargonjargon) incorrectly
Thanks! It's weird, because it was working, and then it wasn't...
(defn save-button [password]
(fn [password]
[:input {:type "button"
:class "btn btn-info"
:value "Save"
:on-click #(pass-us password)}]))
And I call it like [save-button @password]
Well, check out the Form-2 components @mikethompson describes here: https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components
About halfway down.
Dang it...never mind, finally spotted it...there's no issue with that component
I called pass-us
, which had a let-statement binding satom (str (@BigAtom))
- of course, one can't call a map, so this returned the arity error. 😛
@samueldev: yes, the inner fn
is redundant (but also mostly harmless).
@coyotespike: you only need the inner fn
(From-2) when you do some one-time setup in the outer fn.