Utilities for working with frontend views.
Utilities for working with frontend views.
(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"] ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close