Liking cljdoc? Tell your friends :D

worklet.core


compile-formclj

(compile-form env form)

Takes env and ClojureScript form and returns compiled JavaScript

Takes env and ClojureScript form and returns compiled JavaScript
raw docstring

defnclj/smacro

(defn fname args & body)

Similar to clojure.core/defn 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.

(w/defn [] #js {:transform #js [#js {:translateY @position}]})

Similar to clojure.core/defn 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.

(w/defn []
  #js {:transform #js [#js {:translateY @position}]})
raw docstring

fnclj/smacro

(fn fname 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}]})

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}]})
raw docstring

form->worklet-fn-strclj

(form->worklet-fn-str fn-name 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.
raw docstring

globalsclj


known-global-var?clj

(known-global-var? sym)

locals->closure-mapclj

(locals->closure-map locals)

locals->pathsclj

(locals->paths locals)

map->js-objclj

(map->js-obj m)

preprocess-formclj

(preprocess-form env form)

Rewrites get/set syntax for shared values (useSharedValue) @ref -> ref.value (reset! ref val) -> (set! (.-value ref) val)

Rewrites get/set syntax for shared values (useSharedValue)
@ref -> ref.value
(reset! ref val) -> (set! (.-value ref) val)
raw docstring

seq->js-arrayclj

(seq->js-array s)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close