Liking cljdoc? Tell your friends :D
Clojure only.

trident.views

Utilities for working with frontend views.

Utilities for working with frontend views.
raw docstring

defviewcljmacro

(defview f [opts & args] & forms)

Defines a function that optionally takes a map as the first argument.

This is similar to Reagent components. Example:

(defview my-view [opts foo bar]
  [opts foo bar])

(my-view {:some-opt 1} "a" "b")
=> [{:some-opt 1} "a" "b"]
(my-view "a" "b")
=> [nil "a" "b"]
Defines a function that optionally takes a map as the first argument.

This is similar to Reagent components. Example:
```
(defview my-view [opts foo bar]
  [opts foo bar])

(my-view {:some-opt 1} "a" "b")
=> [{:some-opt 1} "a" "b"]
(my-view "a" "b")
=> [nil "a" "b"]
```
sourceraw docstring

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

× close