Is there a way to inline the result of a clojure expression in clojurescript? for example:
(into [:div] (map (fn [db-value] [:div db-value])) (clj-inline (db-get :foo)))
the result of the into should be the same in CLJ and CLJSPossibly a silly question, but why doesn’t
(-> (js/Promise.resolve {:foo :bar})
(.then :foo)
(.then prn))
..output :bar
?Thanks!
(.then #(:foo %))
works fine, but isn’t this equivalent?
.then expects a JS function, but you are passing a keyword
Keywords implement the IFn protocol, which make them callable when used in a ClojureScript context, but passing them as values to JS constructs like .then on promises, or .map on arrays, the JS constructs don’t know how to properly invoke a non-function