angular/packages/core/src/render3/interfaces
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
..
container.ts refactor(core): Rename 'transplanted' view refresh flag and counters to be generic (#50000) 2023-04-26 11:29:48 -07:00
context.ts perf(core): avoid storing LView in __ngContext__ (#45051) 2022-02-18 13:32:11 -08:00
defer.ts refactor(core): add prefetch on idle support for defer blocks (#51629) 2023-09-05 20:49:56 +00:00
definition.ts refactor(core): initial implementation of {#defer} block runtime (#51347) 2023-08-28 17:09:52 +00:00
document.ts refactor(core): Throw an error when the document is not initialized. (#50143) 2023-05-08 14:35:38 -07:00
i18n.ts docs: fix spelling (#46713) 2022-07-08 20:54:52 +00:00
injector.ts refactor(core): Use intersections on branded types. (#49702) 2023-08-31 20:22:12 +00:00
lview_tracking.ts perf(core): only track LViews that are referenced in __ngContext__ (#45172) 2022-02-24 23:51:38 +00:00
node.ts refactor(core): adjust defer block behavior on the server (#51530) 2023-09-01 19:15:16 +00:00
projection.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
public_definitions.ts refactor(compiler-cli): Add signals to internal directive metadata (#49981) 2023-04-25 15:39:18 -07:00
query.ts refactor(core): add single type for injector token (#41580) 2021-04-22 10:47:12 -07:00
renderer.ts refactor(core): remove experimental Renderer3 abstraction (#46605) 2022-06-30 09:04:56 -07:00
renderer_dom.ts fix(core): avoid duplicated content during hydration while processing a component with i18n (#50644) 2023-06-13 13:12:07 +02:00
sanitization.ts feat(core): allow returning Trusted Types from SanitizerFn (#39218) 2020-10-16 08:13:52 -07:00
styling.ts refactor(core): Use intersections on branded types. (#49702) 2023-08-31 20:22:12 +00:00
type_checks.ts refactor(core): initial implementation of {#defer} block runtime (#51347) 2023-08-28 17:09:52 +00:00
view.ts refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00