Closed CamdenClark closed 2 years ago
The error is this line https://github.com/lilactown/helix/blob/9856689e58b1faeb03ea6a21009a7d2ceac21a59/src/helix/core.clj#L394
docstring
is a string, which is being expanded as a sequence of characters via ~@
, so it ends up emitting something like:
(macroexpand '(defcomponent foo "bar"))
;; => (def foo "b" "a" "r" (helix.core/create-component (cljs.core/js-obj "displayName" "foo") (cljs.core/js-obj)))
I think the right fix is to wrap the docstring in a collection when returning from the when
like we do here https://github.com/lilactown/helix/blob/9856689e58b1faeb03ea6a21009a7d2ceac21a59/src/helix/core.clj#L94
With shadow-cljs: