helix

https://github.com/Lokeh/helix
y.khmelevskii 2020-06-10T00:17:31.230100Z

> one thing I like about what we use at work is we add the namespace to the generated class name @lilactown yes, you can do it use label option in Emotion, please check it https://github.com/khmelevskii/emotion-cljs#labels

y.khmelevskii 2020-06-10T00:22:58.233200Z

@fabrao > Oh, if I can only use Button instead of antd/Button I can call Button as `MyButton` , right? Thank you I use something like this

// badge.styled.cljs
(defstyled <Badge> :div ;; antd/Badge in your case 
  {:display       :inline-flex
   :align-items   :center
   :border-radius 12})

// badge.core.cljs
(defnc <Badge>
  [{:keys [class-name
           size
           view
           children]}]
  {:default default-props
   :spec    ::spec/props}
  ($ styled/<Badge> {:class-name class-name
                     :size       size
                     :view view})
        children)

y.khmelevskii 2020-06-10T00:23:37.233900Z

I think that I will add small example with helix to the repo

fabrao 2020-06-10T00:27:03.234300Z

how is the behavior when helix refresh?

fabrao 2020-06-10T00:27:56.234800Z

@y.khmelevskii clj-commons/cljss not refresh with helix

lilactown 2020-06-10T00:35:30.234900Z

nice yeah, our defcss just does this automatically for us

y.khmelevskii 2020-06-10T00:41:41.235100Z

in dev mode? good idea!

y.khmelevskii 2020-06-10T00:42:31.236Z

I don’t have any issues with reloading helix component

fabrao 2020-06-10T00:48:01.237100Z

Do you have channel for emotion?

fabrao 2020-06-10T00:56:33.238200Z

(ns app.core
  (:require
   ["react-dom" :as rdom]
   [helix.dom :as d]
   [helix.core :as hx :refer [$]]
   ["antd/es/button" :default Button]
   [emotion.core :refer [defstyled]]
   [app.lib :refer [defnc]]))

(defstyled Div d/div
           {:color :red})

(defnc App []
       ($ Div "Fernando"))

(defn ^:export start
  []
  (rdom/render ($ App)
    (js/document.getElementById "app")))
What I´m doing wrong?
(defstyled Div d/div
----------------------^---------------------------------------------------------
Can't take value of macro helix.dom/div
--------------------------------------------------------------------------------
  11 |            {:color :red})

fabrao 2020-06-10T01:05:17.238500Z

I solved with this

(defstyled Div "div"
           {:color :red})

(defnc App []
       ($ Div "Fernando"))

👍 2
y.khmelevskii 2020-06-10T01:26:06.238800Z

also you can use keyword :div

y.khmelevskii 2020-06-10T01:26:28.239Z

No, I will create it

fabrao 2020-06-10T01:30:33.239400Z

I thougth helix don´t render hiccup

y.khmelevskii 2020-06-10T01:42:28.239600Z

@fabrao #emotion-cljs