feat(frontend): initial work on react and rumext upgrade

This commit is contained in:
Andrey Antukh 2019-06-19 00:18:52 +02:00
parent ff00bdb3eb
commit 88f45fb618
33 changed files with 184 additions and 144 deletions

View file

@ -154,6 +154,31 @@
[]
(partition 2 params))))
;; (defn normalize-attrs
;; [m]
;; (letfn [(transform [[k v]]
;; (cond
;; (or (= k :class) (= k :class-name))
;; ["className" v]
;; (or (keyword? k) (string? k))
;; [(str/camel (name k)) v]
;; :else
;; [k v]))
;; (walker [x]
;; (if (map? x)
;; (into {} (map tf) x)
;; x))]
;; (walk/postwalk walker m)))
(defn normalize-props
[props]
(clj->js props :keyword-fn (fn [key]
(if (or (= key :class) (= key :class-name))
"className"
(str/camel (name key))))))
;; (defmacro mirror-map [& fields]
;; (let [keys# (map #(keyword (name %)) fields)