(compile-form env form)
Takes env and ClojureScript form and returns compiled JavaScript
Takes env and ClojureScript form and returns compiled JavaScript
(env->location-str env)
Takes env and returns location string
'absolute path (line:column)'
Takes env and returns location string 'absolute path (line:column)'
(fn args & body)
Similar to clojure.core/fn in syntax, but emits a worklet function that is meant to be executed on a separate thread in React Native and have access to shared values from outer scope.
(worklet-fn [] #js {:transform #js [#js {:translateY (.. position -value)}]})
Similar to clojure.core/fn in syntax, but emits a worklet function that is meant to be executed on a separate thread in React Native and have access to shared values from outer scope. (worklet-fn [] #js {:transform #js [#js {:translateY (.. position -value)}]})
(form->worklet-fn-str args body env locals)
Takes args vector, function body, env and local vars. Returns compiled body as JavaScript string suitable to run as a worklet fn.
Takes args vector, function body, env and local vars. Returns compiled body as JavaScript string suitable to run as a worklet fn.
(preprocess-form form)
Rewrites some Clojure forms
(-deref x) -> (.-value x) (reset! x v) -> (set! (.-value x) v)
Rewrites some Clojure forms (-deref x) -> (.-value x) (reset! x v) -> (set! (.-value x) v)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close