Expand description
Prunes any reactive scopes that are within a loop (for, while, etc). We don’t yet
support memoization within loops because this would require an extra layer of reconciliation
(plus a way to identify values across runs, similar to how we use key in JSX for lists).
Eventually we may integrate more deeply into the runtime so that we can do a single level
of reconciliation, but for now we’ve found it’s sufficient to memoize around the loop.
Analogous to TS ReactiveScopes/FlattenReactiveLoopsHIR.ts.
Functions§
- flatten_
reactive_ loops_ hir - Flattens reactive scopes that are inside loops by converting
Scopeterminals toPrunedScopeterminals.