Liking cljdoc? Tell your friends :D

com.pfeodrippe.dinamico.helper

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`.
raw docstring

-inferclj


-routes*clj


http-actionclj

(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.
raw docstring

with-actioncljmacro

(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"]])
raw docstring

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

× close