Remix.run Logo
brene 2 days ago

How does it deal with loops? I’ve often see workflow builders struggle at that?

waleedlatif1 2 days ago | parent | next [-]

for loops we use two sentinel nodes with a backwards edge, and before each iteration, we check the condition and update loop variables.

  sentinel -> body -> sentinel (condition with backwards edge to first sentinel)
in the UI, this is just represented as another block, and depending on the varying types of loops you can either define a collection or the number of iterations
Natfan 2 days ago | parent | prev [-]

and specifically nested loops. if you're spinning up full runtime copies for each loop, you're gonna have a hard time

waleedlatif1 2 days ago | parent [-]

at the moment, we don't support 'loops in loops' on the client-side, but not for any other reason asides from it becoming confusing for users. since we don't actually make copies for each loop, it wouldn't be a performance issue.