Liking cljdoc? Tell your friends :D
ClojureScript only.

reflet.interop

Provides a DB for JS objects and DOM nodes.

Items are indexed by entity references obtained through the reflet.core/with-ref macro, and cleaned up when their React component unmounts. Do not use refs that were not created by with-ref unless you are prepared to clean them up yourself.

Provides a DB for JS objects and DOM nodes.

Items are indexed by entity references obtained through the
`reflet.core/with-ref` macro, and cleaned up when their React
component unmounts. Do not use refs that were not created by
`with-ref` unless you are prepared to clean them up yourself.
raw docstring

dbcljs

source

el!cljs

(el! ref & {:keys [flush mount]})

Returns a react callback for initializing a DOM element ref and putting it into the interop db. Signal is only initialized once.

Options include:

:mount Callback function is called after DOM element is mounted. Accepts the DOM element as it's only argument.

:flush Flushes the reagent ratom queue for immediate computation

Returns a react callback for initializing a DOM element ref and
putting it into the interop db. Signal is only initialized once.

Options include:

:mount
          Callback function is called after DOM element is
          mounted. Accepts the DOM element as it's only argument.

:flush
          Flushes the reagent ratom queue for immediate
          computation
sourceraw docstring

grabcljs

(grab ref)

The preferred function for accessing objects in non-reactive contexts. We do not bother with co-effects. Operations on the DOM or on JS objects are inherently mutable, and not pure.

The preferred function for accessing objects in non-reactive
contexts. We do not bother with co-effects. Operations on the DOM or
on JS objects are inherently mutable, and not pure.
sourceraw docstring

idcljs

(id ref)

DOM element ids cannot start with a number.

DOM element ids cannot start with a number.
sourceraw docstring

regcljs

(reg ref obj)
(reg ref obj opts)

Stores the interop object in the object DB. Optionally accepts a spec with a single key, :destroy. If a destroy fn is provided, that function will be run at tear-down with the obj as argument.

Stores the interop object in the object DB. Optionally accepts a
spec with a single key, `:destroy`. If a destroy fn is provided,
that function will be run at tear-down with the obj as argument.
sourceraw docstring

update!cljs

(update! ref f & args)

Semantics like clojure.core/update, mutates the object in db by running the function with existing object as parameter.

Semantics like `clojure.core/update`, mutates the object in db by
running the function with existing object as parameter.
sourceraw docstring

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

× close