The old custom macro does not support fn-meta. Attempts to use fn-meta with the old version will result in errors, since the custom macro will not insert code properly into helix.core/defnc.
To quickly test this, try something as simple as this:
;;; Make sure you are using your own custom `defnc` macro!
(defnc FancyButton
"Example lifted straight from React documentation."
{:wrap [(react/forwardRef)]}
[{:keys [children]} ref]
(d/button {:ref ref :class "FancyButton"} children))
(defnc Parent []
(let [ref (hooks/use-ref nil)]
($ FancyButton {:ref ref} "Click me!")))
You will get compile error when using the old custom macro, but not the updated one I provide in this PR.
The old custom macro does not support
fn-meta
. Attempts to usefn-meta
with the old version will result in errors, since the custom macro will not insert code properly intohelix.core/defnc
.To quickly test this, try something as simple as this:
You will get compile error when using the old custom macro, but not the updated one I provide in this PR.