hyperfiddle

http://hyperfiddle.net
2018-12-26T12:57:02.004200Z

(->>
         [[: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 all

alexandrkozyrev 2018-12-26T12:58:34.005100Z

ok, it’s the old fiddle, before your “counter” example

2018-12-26T12:58:53.005700Z

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

2018-12-26T13:26:24.006200Z

This is unrelated to the error you are encountering btw, looking into it

alexandrkozyrev 2018-12-26T13:55:46.006500Z

can I use props in hyperfiddle.ui/link call, smth like

alexandrkozyrev 2018-12-26T13:55:48.006700Z

[hyperfiddle.ui/link :intent/def ctx “update” @user/better-def]

alexandrkozyrev 2018-12-26T14:02:49.006900Z

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

2018-12-26T14:08:17.007100Z

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

2018-12-26T14:09:02.007300Z

For today you can use the ctx – (assoc ctx :user/better-def ...) and the same ctx is available in the txfn method

2018-12-26T14:09:26.007500Z

I want to think about this more and will do something in janurary

alexandrkozyrev 2018-12-26T17:24:48.008200Z

is it possible to add GA/gtag.js to a fiddle?

2018-12-26T17:52:26.008500Z

what exactly are you referring to

2018-12-26T18:19:58.008800Z

Transcription of videos http://www.dustingetz.com/:hyperfiddle-rest-fest-2018/

2018-12-26T18:37:26.008900Z

Do you just need a GA code, or do you need specifically gtag.js

2018-12-26T18:38:03.009100Z

I will add a ticket to add a GA code on the subdomain admin panel

alexandrkozyrev 2018-12-26T19:46:07.009300Z

I think GA code is enough