Fork me on GitHub
#hyperfiddle
<
2024-02-08
>
henrik10:02:54

What’s the semantics for a reactive loop? It seems like each call to recur generates a scope that remains active for as long as the loop itself remains mounted. Is this true?

Dustin Getz10:02:28

yeah, see with-cycle if you don’t want a new frame per iteration. the debate is, consider a loop with a dom/div in the body. do you want a sequence of divs or do you want to reuse one div? there may be other aspects i’m not recalling atm

👍 1
Dustin Getz10:02:14

we have more design work to do here

Dustin Getz10:02:36

what are you trying to do?

henrik11:02:38

Good question, both might be valid for different use cases. In this case I’m looping through AI generation for different sections of a page, where each iteration waits for the AI to finish generating before triggering recursion. So in this particular case, I don’t need each recursion to be distinct.

👍 1