Closed cj-price closed 9 months ago
Is your feature request related to a problem? Please describe. I would like to use :css within my uix components.
Describe the solution you'd like Allow the user to do something like this:
(reset! *react-create-element-fn* emotion/jsx)
-or-
(uix.dom/render-root ($ app) root {:react-create-element-fn emotion/jsx})
Describe alternatives you've considered I am not sure if shadow-cljs has the ability to redef react/createElement but that is something I would like to look into.
Additional context Reagent's compiler allows you to do this: https://github.com/reagent-project/reagent/blob/7d8cdad9037ce952ba18868e9a5eaf3fd1c8023e/examples/emotion/src/example/compiler.cljs#L35
There are multiple options. You can do (set! react/createElement your-create-element) or create a wrapper macro for $ macro.
(set! react/createElement your-create-element)
$
Is your feature request related to a problem? Please describe. I would like to use :css within my uix components.
Describe the solution you'd like Allow the user to do something like this:
-or-
Describe alternatives you've considered I am not sure if shadow-cljs has the ability to redef react/createElement but that is something I would like to look into.
Additional context Reagent's compiler allows you to do this: https://github.com/reagent-project/reagent/blob/7d8cdad9037ce952ba18868e9a5eaf3fd1c8023e/examples/emotion/src/example/compiler.cljs#L35