Liking cljdoc? Tell your friends :D

reacl2.core

clj

Supporting macros for Reacl.

Supporting macros for Reacl.
cljs

This namespace contains the Reacl core functionality.

Define classes with the macros defclass or class.

Create return values for a message handler or livecycle methods with return and merge-returned. The auxiliary functions for return values returned-actions, returned-app-state, returned-local-state, returned-messages, returned? will usually only be needed in unit tests.

In event handlers you will usually need to call send-message!.

To instantiate classes that have app-state you need to create bindings with bind, bind-local, use-reaction or use-app-state, and sometimes reactions with reaction or pass-through-reaction.

Sometimes modifications of the created elements are needed via keyed, refer, [[redirect-actions]], reduce-action, action-to-message or map-action.

To finally render a class to the DOM use render-component and handle-toplevel-action.

An older API consists of the functions opt, opt?, no-reaction.

This namespace contains the Reacl core functionality.

Define classes with the macros [[defclass]] or [[class]].

Create return values for a message handler or livecycle methods with [[return]] and [[merge-returned]].
The auxiliary functions for return values [[returned-actions]], [[returned-app-state]],
[[returned-local-state]], [[returned-messages]], [[returned?]] will usually only be needed in unit tests.

In event handlers you will usually need to call [[send-message!]].

To instantiate classes that have app-state you need to create bindings with [[bind]],
[[bind-local]], [[use-reaction]] or [[use-app-state]], and sometimes reactions with [[reaction]] or [[pass-through-reaction]].

Sometimes modifications of the created elements are needed via [[keyed]], [[refer]],
[[redirect-actions]], [[reduce-action]], [[action-to-message]] or [[map-action]].

To finally render a class to the DOM use [[render-component]] and [[handle-toplevel-action]].

An older API consists of the functions [[opt]], [[opt?]], [[no-reaction]].
raw docstring

reacl2.dom

clj

Supporting macros for Reacl's DOM library .

Supporting macros for Reacl's DOM library   .
cljs

Convenience API for constructing virtual DOM.

This has ClojureScript wrappers for the various HTML elements.

These all expect attributes as a ClojureScript map.

Moreover, sub-element sequences need to be ClojureScript sequences of objects constructed using `keyed-dom'.

Moreover, the `letdom' form constructing virtual DOM elements for easy reference in an event handler.

Convenience API for constructing virtual DOM.

This has ClojureScript wrappers for the various HTML elements.

These all expect attributes as a ClojureScript map.

Moreover, sub-element sequences need to be ClojureScript sequences of
objects constructed using `keyed-dom'.

Moreover, the `letdom' form constructing virtual DOM elements for
easy reference in an event handler.
raw docstring

reacl2.test-util.xpath

cljs

An xpath is basically a convenient and compositional way to define a filter function on nodes in a virtual DOM tree, resp. the React test renderer tree, roughly based on a 'path' through the tree.

The functions select, select-all, select-one and contains? apply that filter, starting from a specific context node.

For example:

(require [reacl2.test-util.xpath :as xp :include-macros true])

(>> / ** "div" [xp/text (xp/is= "Hello")])

matches on all div elements anywhere below the context node, that have a text content equal to "Hello".

(>> / my-class / "span" [:id (xp/is= "foo")])

matches on all span children of instances of the class my-class below the context node, that have the id "foo".

(>> my-class [xp/args (xp/is? = [42])])

matches the context node, if it is an instance of my-class and if its argument vector equals [42].

(>> / "span" [xp/first])

matches the first span element below the context node.

An xpath is basically a convenient and compositional way to define
  a filter function on nodes in a virtual DOM tree, resp. the React
  test renderer tree, roughly based on a 'path' through the tree.

  The functions [[select]], [[select-all]], [[select-one]]
  and [[contains?]] apply that filter, starting from a specific
  _context node_.

  For example:

```
(require [reacl2.test-util.xpath :as xp :include-macros true])

(>> / ** "div" [xp/text (xp/is= "Hello")])
```

  matches on all `div` elements anywhere below the context node, that have a text content equal to `"Hello"`.

```
(>> / my-class / "span" [:id (xp/is= "foo")])
```

  matches on all `span` children of instances of the class `my-class` below the context node, that have the id `"foo"`.

```
(>> my-class [xp/args (xp/is? = [42])])
```

  matches the context node, if it is an instance of `my-class` and if its argument vector equals `[42]`.

```
(>> / "span" [xp/first])
```

  matches the first span element below the context node.
raw docstring

reacl2.trace.console

Tracers to be used with reacl2.trace.core/add-tracer! that issue log entries via js/console.log.

Tracers to be used with [[reacl2.trace.core/add-tracer!]] that issue log entries via `js/console.log`.
raw docstring

reacl2.trace.core

Functions to install and uninstall tracers (add-tracer!, remove-tracer!, and primitives and utilities to implement new tracers.

Functions to install and uninstall
tracers ([[add-tracer!]], [[remove-tracer!]], and primitives and
utilities to implement new tracers.
raw docstring

reacl2.util

Various utilities for Reacl.

Various utilities for Reacl.
raw docstring

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

× close