Open habruening opened 3 months ago
I think, it has something to do with the quasiquote macro. It does not resolve the clj
, because it is not in an inner expression.
Interestingly this workaround can be used.
(let [world "World!"
world-as-fragment (js* [(clj (str "Hello " world))])]
(js (console.log (aget (clj world-as-fragment) 1))))
Perhaps the problem is not much relevant in practice. Instead of (js* (clj ..)) we can write (clj ...). I am not sure if this always works. But it looks so. And situations with more complex expressions are not affected by the problem.
This library seems to be very practicable for server based rendering. I don't know if it is still maintained. I think, I found a bug.
This example does not work correctly.
It should generate the js code
console.log("Hello World")
. But it does not resolve the clj macro and yieldsconsole.log(clj(\"Hello \" + world))
.