If you are going to use this namespace, make sure you are using
the https://pub.dev/packages/dinamico_dart dart library in your mobile app.
There enable the new functions using Dinamico.register
.
If you are going to use this namespace, make sure you are using the https://pub.dev/packages/dinamico_dart dart library in your mobile app. There enable the new functions using `Dinamico.register`.
(http-action params)
Pass body-params to your action. This function is usually
used in our handler for /dinamico/http-action
route.
Pass body-params to your action. This function is usually used in our handler for `/dinamico/http-action` route.
(with-action op params & body)
Macro that enables you to call a action seamless from the mobile app, e.g.
from a :onPressed
, :onTag
etc.
params
should always have one parameter. Use destructure for it
(see examples below), which also enable the "listening" of these states.
You must have a POST handler for the /dinamico/http-action
route.
See the dinamico.helper
ns docstring.
-- Usage --
;; Assuming you passed to Dinamico.register
in the mobile app a
;; action called redirect
.
(with-action ::open-id-card [_]
[[:redirect "/id-card"]])
;; set-value
is a built-in action. In this example we are exchanging
;; the contents of the text field.
(with-action ::exchange [{:keys [text1 text2]}]
[[:set-value {:text1 text2 :text2 text1}]
[:redirect "/home"]])
Macro that enables you to call a action seamless from the mobile app, e.g. from a `:onPressed`, `:onTag` etc. `params` should **always** have one parameter. Use destructure for it (see examples below), which also enable the "listening" of these states. You must have a POST handler for the `/dinamico/http-action` route. See the `dinamico.helper` ns docstring. -- Usage -- ;; Assuming you passed to `Dinamico.register` in the mobile app a ;; action called `redirect`. (with-action ::open-id-card [_] [[:redirect "/id-card"]]) ;; `set-value` is a built-in action. In this example we are exchanging ;; the contents of the text field. (with-action ::exchange [{:keys [text1 text2]}] [[:set-value {:text1 text2 :text2 text1}] [:redirect "/home"]])
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close