Fork me on GitHub
#hyperfiddle
<
2023-12-20
>
denik21:12:17

having issues where a reactive value triggers a dom listener more than once which is undesirable. I already tried using snapshot to avoid this but that results in stale data. Is there any way to guarantee a function only runs once on invocation? here’s the listener code

Dustin Getz21:12:46

Won't "running function only once" also result in stale data?

denik21:12:44

once per dom event

Dustin Getz21:12:44

maybe model this as a missionary flow for direct control? dom/on is the primitive we are unhappy with for nontrivial situations

Dustin Getz21:12:36

I think what you want can be achieved with e/snapshot but it's definitely complicated and dumb

Dustin Getz21:12:15

if it can't, I don't see why

denik08:12:55

will try the above. I wonder if because the value (`cell-ent`) in my case is a e/watch(ed) value electric would rerun even the missionary code

denik08:12:26

when I tried snapshot it resolved the repeated runs of the dom handler at the price of stale data

xificurC09:12:09

you can also snapshot higher, e.g. the whole vector passed to db/transact

denik20:12:26

it does look like a bug / unintended behavior to me

Dustin Getz22:12:42

I'm planning our content schedule (blogs and talks) for the spring. Yes, we'll be talking about Differential Electric. Besides that, what else do you want to hear about?

🙏 3
Vincent02:12:21

authentication strategies would be helpful for me

👍 2
danielneal12:12:29

I know you’re focussed on back office apps but I was very impressed with the industrial robot demos and I’d be interested to hear about whether electric (especially with differential) is is still only suitable for back office things or if it might be suitable for more front-end / client-facing use cases

Adrian Smith15:12:23

Optimistic updates, missionary documentation website

grant18:12:20

I’d second @U055PQH9R4M’s authentication request. That is not the sort of thing you want people to have to get right on their own, if it can be avoided.

chromalchemy16:12:08

Im interested in fine grained state construction and manipulation to do bret victor stuff. This is maybe less about the network if not doing multiplayer, but im interested to see strategies from electric context (ie, is an atom enough? Need something like electric datascript or rules engine, etc?)

m pheasant01:12:43

I'm just getting started with this, and love the idea in the always-online scenario. I'm interested to hear more about the intermittent-online possibilities. I'm about to try out scenarios to see how losing connectivity is handled currently - I understand that there are upcoming plans for this - maybe more info on this would be of wider interest?

Daniel Jomphe01:01:39

Late here, but yes, what about choppy wireless connectivity, is resiliency for this on par with regular frameworks, or is there some more automatically done for users?