Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument Restructuring / Variadic Arguments #23

Closed
martinklepsch opened this issue Feb 23, 2015 · 1 comment
Closed

Argument Restructuring / Variadic Arguments #23

martinklepsch opened this issue Feb 23, 2015 · 1 comment

Comments

@martinklepsch
Copy link
Contributor

(rum/defc input1 < rum/reactive [ref & [attrs]]
  [:input (merge {:type "text"
                  :value @ref
                  :on-change #(reset! ref (.. % -target -value))}
                 attrs)])

 (rum/defc input2 < rum/reactive
  ([ref] (input ref nil)
  ([ref attrs]
   [:input (merge {:type "text"
                   :value @ref
                   :on-change #(reset! ref (.. % -target -value))}
                  attrs)]))

I think the two defc calls above don't work. input1 causes:

WARNING: Use of undeclared Var fcc.app/& at line 12 /Users/martin/.boot/tmp/Users/martin/projects/fun-club/ta/-p9hf6h/fcc/app.cljs

input2 causes

WARNING: Use of undeclared Var fcc.app/attrs at line 16 /Users/martin/.boot/tmp/Users/martin/projects/fun-club/30i/-p9hf6h/fcc/app.cljs
@piranha
Copy link
Collaborator

piranha commented Feb 24, 2015

First case should be fixed in 0.2.5, are you by any case using previous version?

@tonsky tonsky closed this as completed in 5a690d5 Jun 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants