I think the best overall solution is shadow-cljs, but this requires a project setup. If you just want to transform some CLJS code, try something like this in a CLJS repl:
(require'[cljs.js:refer[empty-statecompile-str]])(compile-str(empty-state)"(defn add [x y] (+ x y))"#(println(:value%)))
Top comments (1)
I think the best overall solution is
shadow-cljs
, but this requires a project setup. If you just want to transform some CLJS code, try something like this in a CLJS repl:Check the
cljs.js/compile-str
docs.