angular/packages/core/src/render3
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
..
debug feat(devtools): create profiler for DI and injector events (#48639) 2023-08-01 11:44:40 -07:00
deps_tracker refactor(core): more accurate types for standalone component imports in deps tracker (#51377) 2023-08-17 14:01:51 -07:00
features fix(core): ensure that standalone components get correct injector instances (#50954) 2023-07-10 07:07:44 -07:00
i18n refactor(core): cleanup references to dart (#49858) 2023-04-18 14:00:45 +00:00
instructions refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
interfaces refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
jit refactor(core): add instruction to reference component instance (#51618) 2023-09-05 14:19:18 +00:00
reactivity refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
styling refactor: replace deprecated String.prototype.substr() (#45397) 2022-03-24 11:48:09 -07:00
util refactor(core): Use intersections on branded types. (#49702) 2023-08-31 20:22:12 +00:00
after_render_hooks.ts refactor(core): delegate afterRender errors to an ErrorHandler (#51662) 2023-09-08 10:29:33 -07:00
assert.ts refactor(core): initial implementation of {#defer} block runtime (#51347) 2023-08-28 17:09:52 +00:00
bindings.ts refactor(core): Improve ExpressionChangedAfterItHasBeenCheckedError (#50286) 2023-05-16 09:24:51 -07:00
CODE_GEN_API.md refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00
collect_native_nodes.ts fix(core): handle hydration of view containers that use component hosts as anchors (#51456) 2023-08-29 16:37:50 +00:00
component.ts docs: fix missing information in createComponent (#51493) 2023-09-01 16:15:12 +00:00
component_ref.ts refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
context_discovery.ts feat(core): Mark components for check if they read a signal (#49153) 2023-03-27 11:19:06 -07:00
definition.ts refactor(core): kill circular deps by moving scope runtime functions to a new scope.ts file (#51377) 2023-08-17 14:01:51 -07:00
definition_factory.ts refactor(compiler): move factory out of injector definition (#41022) 2021-03-08 15:31:30 -08:00
di.ts refactor(core): Use intersections on branded types. (#49702) 2023-08-31 20:22:12 +00:00
di_setup.ts feat(devtools): create profiler for DI and injector events (#48639) 2023-08-01 11:44:40 -07:00
errors.ts refactor(core): Improve NG100 (#50391) 2023-05-23 15:31:17 +00:00
errors_di.ts refactor(core): support EnvironmentProviders types internally (#47669) 2022-10-07 14:03:13 -07:00
fields.ts feat(core): introduce concept of DestroyRef (#49158) 2023-02-28 11:52:09 -08:00
global_utils_api.ts feat(core): introduce getDirectiveMetadata global debugging utility (#41525) 2021-04-13 16:06:32 -07:00
hooks.ts docs: remove duplicate words. (#51215) 2023-08-01 12:08:33 -07:00
index.ts refactor(core): add instruction to reference component instance (#51618) 2023-09-05 14:19:18 +00:00
local_compilation.ts refactor(core): implement runtime logic to compute component dependencies in local compilation mode (#51377) 2023-08-17 14:01:51 -07:00
metadata.ts refactor(core): update TestBed to handle async component metadata (#51182) 2023-08-15 11:32:09 -07:00
namespaces.ts refactor(core): remove several private utils and APIs (#48357) 2022-12-05 14:35:08 -08:00
ng_module_ref.ts refactor(core): update bootstrapApplication to get NgZone from providers (#49557) 2023-03-31 11:56:09 -07:00
node_assert.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
node_manipulation.ts refactor(core): switch signals to a refcounting algorithm (#51226) 2023-09-01 14:18:41 +00:00
node_manipulation_i18n.ts refactor(core): remove assumptions that component will be first in directives list (#47490) 2022-09-21 10:05:32 +02:00
node_selector_matcher.ts fix(core): more accurate matching of classes during content projection (#48888) 2023-03-20 16:07:13 +01:00
PERF_NOTES.md docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
pipe.ts feat(devtools): create profiler for DI and injector events (#48639) 2023-08-01 11:44:40 -07:00
profiler.ts perf(core): add private hooks around user code executed by the runtime (#41255) 2021-04-02 10:34:23 -07:00
pure_function.ts fix(core): Store the currently selected ICU in LView (#38345) 2020-08-10 12:41:17 -07:00
query.ts refactor(core): remove old AJD workaround for G3 (#48363) 2022-12-06 09:14:23 -08:00
reactive_lview_consumer.ts refactor(core): switch signals to a refcounting algorithm (#51226) 2023-09-01 14:18:41 +00:00
scope.ts refactor(core): implement runtime logic to compute component dependencies in local compilation mode (#51377) 2023-08-17 14:01:51 -07:00
state.ts refactor(core): skip hydration annotation (#49345) 2023-03-08 17:56:43 +00:00
STORING_METADATA_IN_D.TS.md docs: convert the last my-app components to app-root (#42256) 2021-05-25 22:13:36 +00:00
tokens.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
TREE_SHAKING.md docs(ivy): add feature principle doc (#21565) 2018-01-17 17:01:09 -08:00
VIEW_DATA.md refactor(core): Replace ExpandoInstructions with HostBindingOpCodes (#39301) 2020-10-22 09:35:48 -07:00
view_engine_compatibility_prebound.ts feat(core): add support for Types in ViewContainerRef.createComponent (#43022) 2021-09-29 13:49:13 -07:00
view_manipulation.ts refactor(core): adjust defer block behavior on the server (#51530) 2023-09-01 19:15:16 +00:00
view_ref.ts refactor(core): introduce LView and LContainer utility functions (#51191) 2023-08-04 16:00:44 -04:00