Fork me on GitHub
#reagent
<
2015-07-06
>
coyotespike21:07:39

Why were you getting Invalid Arity: 1? Inquiring minds want to know!

samueldev21:07:49

I was calling the [:div] function (... function? macro? jargonjargonjargon) incorrectly

samueldev21:07:55

I believe it was a parens issue

samueldev21:07:04

If you are encountering the same thing, paste your code I'll have a look

coyotespike21:07:24

Thanks! It's weird, because it was working, and then it wasn't...

coyotespike21:07:53

(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]

samueldev21:07:33

I could be wrong here but isn't the fn inside your defn redundant?

samueldev21:07:43

(I'm a total noob here so take everything I say with a grain of salt)

coyotespike21:07:00

About halfway down.

coyotespike21:07:37

Dang it...never mind, finally spotted it...there's no issue with that component

coyotespike21:07:31

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. 😛

mikethompson22:07:57

@samueldev: yes, the inner fn is redundant (but also mostly harmless).

mikethompson22:07:11

@coyotespike: you only need the inner fn (From-2) when you do some one-time setup in the outer fn.