Liking cljdoc? Tell your friends :D

uix.core

Public API

Public API
raw docstring

$clj/smacro

($ tag)
($ tag props & children)

Creates React element

DOM element: ($ :button#id.class {:on-click handle-click} "click me") React component: ($ title-bar {:title "Title"})

Creates React element

DOM element: ($ :button#id.class {:on-click handle-click} "click me")
React component: ($ title-bar {:title "Title"})
raw docstring

*current-component*cljs


as-reactcljs

(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

create-classcljs

(create-class {:keys [constructor getInitialState render componentDidMount
                      componentDidUpdate componentDidCatch shouldComponentUpdate
                      getSnapshotBeforeUpdate componentWillUnmount
                      childContextTypes contextTypes contextType
                      getDerivedStateFromProps getDerivedStateFromError
                      defaultProps displayName]
               :as fields})

Creates class based React component

Creates class based React component
raw docstring

create-contextcljs

(create-context)
(create-context default-value)

Creates React Context with an optional default value

Creates React Context with an optional default value
raw docstring

create-refcljs

(create-ref)

Creates React's ref type object.

Creates React's ref type object.
raw docstring

defuiclj/smacro

(defui sym & fdecl)

Creates UIx component. Similar to defn, but doesn't support multi arity. A component should have a single argument of props.

Creates UIx component. Similar to defn, but doesn't support multi arity.
A component should have a single argument of props.
raw docstring

glue-argscljs

(glue-args props)

jsfy-depscljs

(jsfy-deps coll)

lazycljs

(lazy f)

Like React.lazy, but supposed to be used with UIx components

Like React.lazy, but supposed to be used with UIx components
raw docstring

memocljs

(memo f)
(memo f should-update?)

Takes component f and optional 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/=

Takes component `f` and optional 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/=
raw docstring

parse-sigclj

(parse-sig name fdecl)

sourceclj/smacro

(source sym)

Returns source string of UIx component

Returns source string of UIx component
raw docstring

stringify-clojure-primitivescljs

(stringify-clojure-primitives v)

use-callbackclj/smacro

(use-callback f deps)

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

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

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

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

use-contextcljs

(use-context context)

Takes React context and returns its current value

Takes React context and returns its current value
raw docstring

use-effectclj/smacro

(use-effect f)
(use-effect f 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

use-imperative-handleclj/smacro

(use-imperative-handle ref f)
(use-imperative-handle ref f deps)

Customizes the instance value that is exposed to parent components when using ref.

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

Customizes the instance value that is exposed to parent components when using ref.

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

use-layout-effectclj/smacro

(use-layout-effect f)
(use-layout-effect f 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

use-memoclj/smacro

(use-memo f deps)

Takes function f and required vector of dependencies, and returns memoized result of f.

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

Takes function f and required vector of dependencies, and returns memoized result of f.

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

use-reducercljs

(use-reducer f value)
(use-reducer f value init-state)

An alternative to use-state. Accepts a reducer of type (state, action) => new-state, and returns the current state paired with a dispatch method.

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

An alternative to `use-state`. Accepts a reducer of type (state, action) => new-state,
and returns the current state paired with a dispatch method.

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

use-refcljs

(use-ref)
(use-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

use-statecljs

(use-state value)

Takes initial value or a function that computes it and returns a stateful value, and a function to update it.

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

Takes initial value or a function that computes it and returns a stateful value,
and a function to update it.

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

vector->js-arrayclj

(vector->js-array coll)

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

× close