angular/packages/core/test/render3
Alex Rickabaugh 4e890cc5ac refactor(core): add support for new effect scheduling. (#56501)
The original effect design for Angular had one "bucket" of effects, which
are scheduled on the microtask queue. This approach got us pretty far, but
as developers have built more complex reactive systems, we've hit the
limitations of this design.

This commit changes the nature of effects significantly. In particular,
effects created in components have a completely new scheduling system, which
executes them as a part of the change detection cycle. This results in
behavior similar to that of nested effects in other reactive frameworks. The
scheduling behavior here uses the "mark for traversal" flag
(`HasChildViewsToRefresh`). This has really nice behavior:

 * if the component is dirty already, effects run following preorder hooks
   (ngOnInit, etc).
 * if the component isn't dirty, it doesn't get change detected only because
   of the dirty effect.

This is not a breaking change, since `effect()` is in developer preview (and
it remains so).

As a part of this redesigned `effect()` behavior, the `allowSignalWrites`
flag was removed. Effects no longer prohibit writing to signals at all. This
decision was taken in response to feedback / observations of usage patterns,
which showed the benefit of the restriction did not justify the DX cost.

The new effect timing is not yet enabled - a future PR will flip the flag.

PR Close #56501
2024-09-18 14:52:25 -07:00
..
i18n fix(core): take skip hydration flag into account while hydrating i18n blocks (#57299) 2024-08-09 08:07:48 -07:00
instructions refactor(core): add support for new effect scheduling. (#56501) 2024-09-18 14:52:25 -07:00
interfaces refactor(core): integrate let instructions into the runtime (#56527) 2024-06-26 08:48:31 -07:00
ivy refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
jit fix(compiler): JIT mode incorrectly interpreting host directive configuration in partial compilation (#57002) 2024-07-16 08:37:26 -07:00
styling_next refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
util refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
BUILD.bazel fix(core): untrack various core operations (#54614) 2024-02-29 11:38:54 +01:00
change_detection_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
component_ref_spec.ts feat(core): expose signal input metadata in ComponentMirror (#56402) 2024-06-13 10:12:06 -07:00
deps_tracker_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
di_spec.ts refactor(core): add support for new effect scheduling. (#56501) 2024-09-18 14:52:25 -07:00
es2015-tsconfig.json fix(core): destroy hooks not set up for useClass provider using forwardRef (#44281) 2021-11-30 11:56:05 -05:00
global_utils_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
i18n_debug_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
imported_renderer2.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
instructions_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
integration_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
is_shape_of.ts fix(core): take skip hydration flag into account while hydrating i18n blocks (#57299) 2024-08-09 08:07:48 -07:00
is_shape_of_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
jit_environment_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
list_reconciliation_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
load_domino.ts fix(platform-server): Do not delete global Event (#53659) 2024-01-04 12:51:22 -08:00
matchers.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
matchers_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
metadata_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
microtask_effect_spec.ts refactor(core): add support for new effect scheduling. (#56501) 2024-09-18 14:52:25 -07:00
multi_map_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
node_selector_matcher_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
providers_helper.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
providers_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
query_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
reactive_safety_spec.ts refactor(core): add support for new effect scheduling. (#56501) 2024-09-18 14:52:25 -07:00
reactivity_spec.ts refactor(core): add support for new effect scheduling. (#56501) 2024-09-18 14:52:25 -07:00
testing_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
utils.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00
view_fixture.ts refactor(core): add support for new effect scheduling. (#56501) 2024-09-18 14:52:25 -07:00
view_utils_spec.ts refactor: migrate core to prettier formatting (#55488) 2024-04-29 09:49:19 -07:00