helix

https://github.com/Lokeh/helix
Luis C. Arbildo 2020-05-01T20:16:32.099700Z

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?

lilactown 2020-05-01T20:18:40.100400Z

you have to tell me what you mean by “doesn’t work” 😄 I don’t have the time to create your example from scratch

Luis C. Arbildo 2020-05-01T20:20:25.101Z

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`. 

lilactown 2020-05-01T20:21:52.101400Z

($ (d/div (test-styled "Hello"))) this looks wrong

lilactown 2020-05-01T20:22:02.101700Z

$ why is that there?

lilactown 2020-05-01T20:22:41.102500Z

$ is used to create an element out of a component. d/div and test-styled both create elements, so $ is not needed

💯 1
✅ 1
lilactown 2020-05-01T20:23:04.103100Z

you would only use $ if you were creating an element out of a React component like:

($ my-component ,,,)

Luis C. Arbildo 2020-05-01T20:23:21.103300Z

😅

Luis C. Arbildo 2020-05-01T20:23:39.103800Z

You right, sorry, I'm retaking helix by a long time

lilactown 2020-05-01T20:24:16.104200Z

no worries!

Luis C. Arbildo 2020-05-01T20:24:25.104400Z

Thank you!

2020-05-01T23:08:09.107900Z

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 ?