angular/packages/core
Andrew Scott 83a3b85c35 refactor(core): Do not refresh view if producers did not actually change (#52476)
Producers represent values which can deliver change notifications.
When a producer value is changed, a change notification is propagated through the graph,
notifying live consumers which depend on the producer of the potential update.
Note here that this is a _potential_ update.

A producer may not have actually "changed" based on its equality function. With
this commit, before refreshing a view that is only marked for refresh
because its consumer is dirty, we poll producers for change to see if
they really have. If not, we can skip the refresh. The example test in this commit
shows that a `computed` which depends on a `signal` that is updated but
produces a value that is the same as before will _not_ cause the
component's template to refresh.

fixes #51797

PR Close #52476
2023-11-02 13:23:49 -07:00
..
global build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
primitives/signals refactor(core): Update LView consumer to use only 1 consumer for a component (#52476) 2023-11-02 13:23:49 -07:00
reference-manifests build: add target to generate api manifest (#52472) 2023-11-02 11:00:59 -07:00
rxjs-interop fix(core): add rejectErrors option to toSignal (#52474) 2023-10-31 14:59:26 -07:00
schematics fix(core): handle aliased index with no space in control flow migration (#52444) 2023-10-31 13:45:00 -07:00
src refactor(core): Do not refresh view if producers did not actually change (#52476) 2023-11-02 13:23:49 -07:00
test refactor(core): Do not refresh view if producers did not actually change (#52476) 2023-11-02 13:23:49 -07:00
testing Revert "refactor(core): rename ViewRef<T> to InternalViewRef<T> and remove existing InternalViewRef (#52430)" (#52484) 2023-11-01 10:13:12 -07:00
BUILD.bazel build: add targets for api doc generation (#52034) 2023-10-10 16:18:50 -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 node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -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