How to combine two #js cards in Om Clojurescript?

In clojurescript, when I combine two cards, I can do it like this:

(merge {:a 1} {:b 2})

How can I achieve a similar thing in Om where literals are used, something like this (which doesn't work):

(merge #js {:a 1} #js {:b 2})
+4
source share
1 answer

You can combine them as usual and then use them clj->jsto convert the result to javascript:

(clj->js (merge {:a 1} {:b 2}))

+3
source

Source: https://habr.com/ru/post/1539119/


All Articles