Liking cljdoc? Tell your friends :D

dumdom.component


componentclj/s

(component render)
(component render opt)

Returns a component function that uses the provided function for rendering. The resulting component will only call through to its rendering function when called with data that is different from the data that produced the currently rendered version of the component.

The rendering function can be called with any number of arguments, but only the first one will influence rendering decisions. You should call the component with a single immutable value, followed by any number of other arguments, as desired. These additional constant arguments are suitable for passing messaging channels, configuration maps, and other utilities that are constant for the lifetime of the rendered element.

The optional opts argument is a map with additional properties:

:on-mount - A function invoked once, immediately after initial rendering. It is passed the rendered DOM node, and all arguments passed to the render function.

:on-update - A function invoked immediately after an updated is flushed to the DOM, but not on the initial render. It is passed the underlying DOM node, the value, and any constant arguments passed to the render function.

:on-render - A function invoked immediately after the DOM is updated, both on the initial render and subsequent updates. It is passed the underlying DOM node, the value, the old value, and any constant arguments passed to the render function.

:on-unmount - A function invoked immediately before the component is unmounted from the DOM. It is passed the underlying DOM node, the most recent value and the most recent constant args passed to the render fn.

:will-appear - A function invoked when this component is added to a mounting container component. Invoked at the same time as :on-mount. It is passed the underlying DOM node, a callback function, the most recent value and the most recent constant args passed to the render fn. The callback should be called to indicate that the element is done "appearing".

:did-appear - A function invoked immediately after the callback passed to :will-appear is called. It is passed the underlying DOM node, the most recent value, and the most recent constant args passed to the render fn.

:will-enter - A function invoked when this component is added to an already mounted container component. Invoked at the same time as :on.mount. It is passed the underlying DOM node, a callback function, the value and any constant args passed to the render fn. The callback function should be called to indicate that the element is done entering.

:did-enter - A function invoked after the callback passed to :will-enter is called. It is passed the underlying DOM node, the value and any constant args passed to the render fn.

:will-leave - A function invoked when this component is removed from its containing component. Is passed the underlying DOM node, a callback function, the most recent value and the most recent constant args passed to the render fn. The DOM node will not be removed until the callback is called.

:did-leave - A function invoked after the callback passed to :will-leave is called (at the same time as :on-unmount). Is passed the underlying DOM node, the most recent value and the most recent constant args passed to the render fn.

Returns a component function that uses the provided function for rendering. The
resulting component will only call through to its rendering function when
called with data that is different from the data that produced the currently
rendered version of the component.

The rendering function can be called with any number of arguments, but only
the first one will influence rendering decisions. You should call the
component with a single immutable value, followed by any number of other
arguments, as desired. These additional constant arguments are suitable for
passing messaging channels, configuration maps, and other utilities that are
constant for the lifetime of the rendered element.

The optional opts argument is a map with additional properties:

:on-mount - A function invoked once, immediately after initial rendering. It
is passed the rendered DOM node, and all arguments passed to the render
function.

:on-update - A function invoked immediately after an updated is flushed to the
DOM, but not on the initial render. It is passed the underlying DOM node, the
value, and any constant arguments passed to the render function.

:on-render - A function invoked immediately after the DOM is updated, both on
the initial render and subsequent updates. It is passed the underlying DOM
node, the value, the old value, and any constant arguments passed to the
render function.

:on-unmount - A function invoked immediately before the component is unmounted
from the DOM. It is passed the underlying DOM node, the most recent value and
the most recent constant args passed to the render fn.

:will-appear - A function invoked when this component is added to a mounting
container component. Invoked at the same time as :on-mount. It is passed the
underlying DOM node, a callback function, the most recent value and the most
recent constant args passed to the render fn. The callback should be called to
indicate that the element is done "appearing".

:did-appear - A function invoked immediately after the callback passed
to :will-appear is called. It is passed the underlying DOM node, the most
recent value, and the most recent constant args passed to the render fn.

:will-enter - A function invoked when this component is added to an already
mounted container component. Invoked at the same time as :on.mount. It is
passed the underlying DOM node, a callback function, the value and any
constant args passed to the render fn. The callback function should be called
to indicate that the element is done entering.

:did-enter - A function invoked after the callback passed to :will-enter is
called. It is passed the underlying DOM node, the value and any constant args
passed to the render fn.

:will-leave - A function invoked when this component is removed from its
containing component. Is passed the underlying DOM node, a callback function,
the most recent value and the most recent constant args passed to the render
fn. The DOM node will not be removed until the callback is called.

:did-leave - A function invoked after the callback passed to :will-leave is
called (at the same time as :on-unmount). Is passed the underlying DOM node,
the most recent value and the most recent constant args passed to the render
fn.
sourceraw docstring

component?clj/s

(component? x)
source

CSSTransitionGroupclj/s

(CSSTransitionGroup el-fn opt children)
source

TransitionGroupclj/s

(TransitionGroup el-fn opt children)
source

TransitioningElementclj/s

source

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

× close