-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Spurious React key warnings if html macro chooses to interpret #57
Comments
Got the same problem with [sablono "0.3.5-SNAPSHOT"] |
Got same problem with sablono 0.5.3 So it seems that contents of every |
I added a test case for this issue over here #96, but can't reproduce the warning. Can someone provide a test case that does cause the warning? |
Is it possible to get cljs repl within project? And also run one testcase (like |
I'm complete clojure noob and was not able to assemble a test in sablono test suite, but here's minimal working example based on https://github.com/swannodette/mies template: https://github.com/quetz/sab57 To compile:
Then open |
@quetz You can get a REPL by running |
I'm also getting this error. Does anyone have a workaround? |
@tonsky I'm trying to figure out what the problem is. Any idea why I can't (require '[sablono.core :refer [html]])
(require '[rum.core :refer [defc]])
(macroexpand-1
'(defc issue-57-rum [text]
(html
(let [text-add (str text " warning")]
[:div
[:h1 text]
[:h1 text-add]])))) I get the following error from
|
No need to do do html inside sefc -- it's added by default by rum. Maybe that's the problem -----Original Message----- @tonsky I'm trying to figure out what the problem is. Any idea why I can't macroexpand-1 this: (macroexpand-1
ThreadPoolExecutor.java: 1142 java.util.concurrent.ThreadPoolExecutor/runWorker |
@quetz I'm not sure but I think this is already fixed in master. Can you please try your example with sablono |
@tonsky, nope, removing
Gives warning. And this does not:
|
@r0man, yeah it seems to be fixed in 0.6.0. Thanks alot! |
@quetz Ok, cool :) |
In this diff, the red version generates React key warnings, and the green version does not.
The
html
macro compile path does not generate warnings, but if the macro takes the interpreter path, it passes react an array rather than applying children as varargs.The text was updated successfully, but these errors were encountered: