angular/packages/core/test/bundling/hydration
Rocky Meza 219462fe0f refactor(core): Split consumerBefore/AfterComputation (#62549)
This makes it possible to batch effects, where we can "reopen" consumers
during initial render and then finalize them after we are finally done
adding all the effects to a batch:

```
function createBatch() {
  const effect = // ... create effect node
  resetConsumerBeforeComputation(effect);
  return effect;
}

// pseudo-code
function appendEffect(effectBatch, updater) {
  if (value is a signal) {
    const prevConsumer = setActiveConsumer(effectBatch.node);
    const output = value();
    setActiveConsumer(prevConsumer);
    effectBatch.push({ signal, updater });
    return output;
  }
}

function finalizeBatch(effectBatch) {
  if (effectBatch.length > 0) {
    finalizeConsumerAfterComputation(effectBatch.node);
  }
}

const effectBatch = createBatchEffectNode();
appendEffect(signal1, (newValue) => /* something */);
appendEffect(signal2, (newValue) => /* something different */);
finalizeBatch(effectBatch);
```

PR Close #62549
2025-09-11 15:47:34 +00:00
..
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63384) 2025-08-25 15:45:46 -07:00
bundle.golden_symbols.json refactor(core): Split consumerBefore/AfterComputation (#62549) 2025-09-11 15:47:34 +00:00
main.ts build: adjust bundling tests to use Angular CLI (#61566) 2025-05-29 14:39:11 -04:00
treeshaking_spec.ts build: migrate packages/core/test to new jasmine_test rule (#61902) 2025-06-12 10:00:09 +02:00