(->>
[[:db/add (:db/id val) :intent/def @user/better-def]]
(hyperfiddle.ui.util/with-tx! ctx "$"))
@alexandrkozyrev with-tx!
is a private API, Use hyperfiddle.api/tx-fn instead. with-tx!
should only be available in debug/dev, because it is unsafe, it lets you stage anything. Really it shouldn't be available at allok, it’s the old fiddle, before your “counter” example
Think of it this way: in prod, you don't trust the user, so all the transactions have to be controlled by your fiddles. The tx-fn will run in the cloud rather than the browser, where it can't be tampered with
This is unrelated to the error you are encountering btw, looking into it
can I use props in hyperfiddle.ui/link call, smth like
[hyperfiddle.ui/link :intent/def ctx “update” @user/better-def]
when I try to use it (click “update” button) here http://alexandrkozyrev.hyperfiddle.net/:intent-bad-name-editor/17592186047106, I get “#object[TypeError TypeError: Cannot read property ‘call’ of undefined]” alert
Hmm good question, no, the signature is (defmulti txfn (fn [user-txfn e a v ctx] user-txfn))
but i think you are right, this is an oversight and it should be supported
For today you can use the ctx – (assoc ctx :user/better-def ...)
and the same ctx is available in the txfn method
I want to think about this more and will do something in janurary
is it possible to add GA/gtag.js to a fiddle?
what exactly are you referring to
Transcription of videos http://www.dustingetz.com/:hyperfiddle-rest-fest-2018/
Do you just need a GA code, or do you need specifically gtag.js
I will add a ticket to add a GA code on the subdomain admin panel
I think GA code is enough