Liking cljdoc? Tell your friends :D

uix.core.alpha

Public API

Public API
raw docstring

__devtools-hookcljs


add-transform-fnclj/s

(add-transform-fn f)

as-elementclj/s

(as-element x)

Compiles Hiccup into React elements at run-time.

Compiles Hiccup into React elements at run-time.
raw docstring

as-reactclj/s

(as-react f)

Interop with React components. Takes UIx component function and returns same component wrapped into interop layer.

Interop with React components. Takes UIx component function and returns same component wrapped into interop layer.
raw docstring

callbackclj/s

(callback f)
(callback f deps)

Takes function f and optional vector of dependencies, and returns f.

Takes function f and optional vector of dependencies, and returns f.
raw docstring

contextclj/s

(context v)

Takes React context and returns its current value

Takes React context and returns its current value
raw docstring

context-providerclj/smacro

(context-provider [ctx value] & children)

Takes a binding form where ctx is React context and value is a supplied value and any number of and child components. cljs: Injects provided value into the context for current components sub-tree. clj: Creates new bindings for ctx with supplied value, see clojure.core/binding

Takes a binding form where `ctx` is React context and `value` is a supplied value
and any number of and child components.
cljs: Injects provided value into the context for current components sub-tree.
clj: Creates new bindings for `ctx` with supplied `value`, see clojure.core/binding 
raw docstring

create-classcljs

(create-class {:keys [constructor static prototype]})

Creates class based React component

Creates class based React component
raw docstring

create-contextcljs

(create-context v)

create-error-boundaryclj/s

(create-error-boundary {:keys [display-name error->state handle-catch]
                        :or {display-name (str (gensym "error-boundary"))}}
                       render-fn)

Creates React's Error Boundary component

display-name — the name of the component to be displayed in stack trace error->state — maps error object to component's state that is used in render-fn handle-catch — for side-effects, logging etc. render-fn — takes state value returned from error->state and a vector of arguments passed into error boundary

Creates React's Error Boundary component

display-name — the name of the component to be displayed in stack trace
error->state — maps error object to component's state that is used in render-fn
handle-catch — for side-effects, logging etc.
render-fn — takes state value returned from error->state and a vector of arguments passed into error boundary
raw docstring

create-refclj/s

(create-ref)
(create-ref v)

Creates React's ref type object.

Creates React's ref type object.
raw docstring

cursor-inclj/s

(cursor-in ref path)

Takes ref type value and path vector and returns ref type cursor value watching into original ref

Takes ref type value and path vector and returns ref type cursor value watching into original ref
raw docstring

defcontextclj/smacro

(defcontext name)
(defcontext name value)

cljs: Creates React context with initial value set to value. clj: Create dynamic var bound to value.

cljs: Creates React context with initial value set to `value`.
clj: Create dynamic var bound to `value`.
raw docstring

defuiclj/smacro

(defui sym args & body)

Compiles UIx component into React component at compile-time.

Compiles UIx component into React component at compile-time.
raw docstring

effect!clj/s

(effect! setup-fn)
(effect! setup-fn deps)

Takes a function to be executed in an effect and optional vector of dependencies.

See: https://reactjs.org/docs/hooks-reference.html#useeffect

Takes a function to be executed in an effect and optional vector of dependencies.

See: https://reactjs.org/docs/hooks-reference.html#useeffect
raw docstring

htmlclj/smacro

(html expr)

Compiles Hiccup into React elements at compile-time.

Compiles Hiccup into React elements at compile-time.
raw docstring

layout-effect!clj/s

(layout-effect! setup-fn)
(layout-effect! setup-fn deps)

Takes a function to be executed in a layout effect and optional vector of dependencies.

See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect

Takes a function to be executed in a layout effect and optional vector of dependencies.

See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
raw docstring

memoclj/s

(memo f)
(memo f deps)

Takes function f and optional vector of dependencies, and returns memoized f.

Takes function f and optional vector of dependencies, and returns memoized f.
raw docstring

memoizeclj/s

(memoize f)
(memoize f should-update?)

Takes component f and comparator function should-update? that takes previous and next props of the component. Returns memoized f.

When should-update? is not provided uses default comparator that compares props with clojure.core/=

UIx components are memoized by default

Takes component `f` and comparator function `should-update?`
that takes previous and next props of the component.
Returns memoized `f`.

When `should-update?` is not provided uses default comparator
that compares props with clojure.core/=

UIx components are memoized by default
raw docstring

no-memoize!clj/s

(no-memoize! f)

Disables memoization of the f component

Disables memoization of the `f` component
raw docstring

profilerclj/s

(profiler child {:keys [id on-render] :as attrs})

ReactRefcljs


refclj/s

(ref)
(ref value)

Takes optional initial value and returns React's ref hook wrapped in atom-like type.

Takes optional initial value and returns React's ref hook wrapped in atom-like type.
raw docstring

stateclj/s

(state value)

Takes initial value and returns React's state hook wrapped in atom-like type.

Takes initial value and returns React's state hook wrapped in atom-like type.
raw docstring

strict-modeclj/s

(strict-mode child)

subscribeclj/s

(subscribe {:keys [get-current-value subscribe] :as subscription})

subscribe - fn, takes callback, sets up a listener on external event emitter which calls the callback and returns a function that unsets the listener.

get-current-value - fn, returns current state of the external event emitter

subscribe - fn, takes callback, sets up a listener on external event emitter
             which calls the callback and returns a function that unsets the listener.

get-current-value - fn, returns current state of the external event emitter
raw docstring

with-effectclj/smacro

(with-effect deps & body)

Convenience macro for effect hook.

Convenience macro for effect hook.
raw docstring

with-layout-effectclj/smacro

(with-layout-effect deps & body)

Convenience macro for layout effect hook.

Convenience macro for layout effect hook.
raw docstring

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

× close