(action-reducer f & args)Returns a functions that takes [app-state action] as arguments, and then calls f on them and any additional args.
Returns a functions that takes `[app-state action]` as arguments, and then calls `f` on them and any additional `args`.
(constantly content)A non-app-state class that always renders as content and does nothing else.
A non-app-state class that always renders as `content` and does nothing else.
(defc name opt app-state? [params*] body)Defines a 'light-weight' class, i.e. a function that can be called like a reacl class.
The opt parameter will always be set, even if the caller did not specify one. Note that you should always pass opt and app-state as-is to some other class instantiation.
For example with the following definition:
(defc reverser opt app-state [& items]
(list-view opt app-state (reverse items))
then reverser can be used just as if it would be an equivalent class.
Note that the macro can also be used without an app-state.
Defines a 'light-weight' class, i.e. a function that can be called like a reacl class. The `opt` parameter will always be set, even if the caller did not specify one. Note that you should always pass `opt` and `app-state` as-is to some other class instantiation. For example with the following definition: ``` (defc reverser opt app-state [& items] (list-view opt app-state (reverse items)) ``` then `reverser` can be used just as if it would be an equivalent class. Note that the macro can also be used without an app-state.
(defc-dom name docstring? opt app-state? [attrs params*] body)Like defc, where the first class argument will always be an
attribte map, event if not called with one.
Like [[defc]], where the first class argument will always be an attribte map, event if not called with one.
(defn-dom name docstring? [attrs params*] body)Like [[clojure.core/defn]] where the first argument will always be an attribute map, event if not called with one.
Like [[clojure.core/defn]] where the first argument will always be an attribute map, event if not called with one.
(reduce-action elem f & args)Pipes all actions produced by the given component elem
through (f app-state action & args), where app-state is
undefined if elem is an instance of a non-app-state class.
Pipes all actions produced by the given component `elem` through `(f app-state action & args)`, where `app-state` is undefined if `elem` is an instance of a non-app-state class.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |