angular/packages/core
Alex Rickabaugh 38c9f08c8d refactor(core): decouple effects from change detection (#51049)
Previously effects were queued as they became dirty, and this queue was
flushed at various checkpoints during the change detection cycle. The result
was that change detection _was_ the effect runner, and without executing CD,
effects would not execute. This leads a particular tradeoff:

* effects are subject to unidirectional data flow (bad for dx)
* effects don't cause a new round of CD (good/bad depending on use case)
* effects can be used to implement control flow efficiently (desirable)

This commit changes the scheduling mechanism. Effects are now scheduled via
the microtask queue. This changes the tradeoffs:

* effects are no longer limited by unidirectional data flow (easy dx)
* effects registered in the Angular zone will trigger CD after they run
  (same as `Promise.resolve` really)
* the public `effect()` type of effect probably isn't a good building block
  for our built-in control flow, and we'll need a new internal abstraction.

As `effect()` is in developer preview, changing the execution timing is not
considered breaking even though it may impact current users.

PR Close #51049
2023-09-12 08:12:56 -07:00
..
global build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rxjs-interop fix(core): avoid duplicated code between entry-points (primary, testing, rxjs-interop) (#51500) 2023-08-29 17:55:34 +00:00
schematics refactor(compiler): implement conditional block AST (#51299) 2023-08-10 13:48:55 -07:00
src refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
test refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
testing refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
BUILD.bazel build(core): introduce @angular/core/rxjs-interop entrypoint (#49154) 2023-03-30 09:44:38 -07:00
index.ts refactor(core): made comment structure consistent in index.ts (#43684) 2021-10-21 18:39:58 +00:00
package.json build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00