Hello!, I'm trying to use styled-components with https://github.com/dvingo/cljs-styled-components, but It doesn't work.
(defstyled test-styled :span {:color "blue"})
(defnc NiceComponent []
(d/div
($ (d/div (test-styled "Hello")))))
Any idea?you have to tell me what you mean by “doesn’t work” 😄 I don’t have the time to create your example from scratch
oh sorry, there is an error like
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of `app.core/NiceComponent`.
($ (d/div (test-styled "Hello")))
this looks wrong
$
why is that there?
$
is used to create an element out of a component. d/div
and test-styled
both create elements, so $
is not needed
you would only use $
if you were creating an element out of a React component like:
($ my-component ,,,)
😅
You right, sorry, I'm retaking helix by a long time
no worries!
Thank you!
Hi, How do you approach integer inputs and set-state . Do you mantain fidedignty with the type while editing calling :value (str value) :on-change (fn-to-convert-to-integer) . Can you share your strategies on this ?