Skip to content

feat(core): explicit effect#68703

Draft
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:explicit-effect
Draft

feat(core): explicit effect#68703
JeanMeche wants to merge 1 commit into
angular:mainfrom
JeanMeche:explicit-effect

Conversation

@JeanMeche
Copy link
Copy Markdown
Member

@JeanMeche JeanMeche commented May 12, 2026

This is a mere exploration.
This idea is to mimic the pattern we already have for resource and to a lesser extent linkedSignal :

effect(
  () => trackedBoolean(),
  (boolean) => {
    // This read should not be tracked as a dependency.
    untrackedSignal();
  },
);

fixes #56155

Curious about what the community would think of it.

@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: core Issues related to the framework runtime labels May 12, 2026
@ngbot ngbot Bot modified the milestone: Backlog May 12, 2026
@eneajaho
Copy link
Copy Markdown
Contributor

Let's go!

This is a mere exploration.

fixes angular#56155
@michael-small
Copy link
Copy Markdown
Contributor

Curious about what the community would think of it

I am routinely caught off guard by effect usage where functions used inside of them have hidden tracked signals. And the implementation of those functions are not always on my end, so I end up cautiously using either untracked or one of the alternatives for explicit tracking that you added to ngxtension (explicitEffect and on for others' reference). I think this would be a nice option to have natively.

@johalternate
Copy link
Copy Markdown

johalternate commented May 13, 2026

This would definitely be a nice addition and eliminate the need of being hyper-defensive when writing effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explicit Tracking for effect(): Request for Reconsideration

4 participants