Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

untracked for all methods? #4268

Open
1 of 2 tasks
manfredsteyer opened this issue Feb 28, 2024 · 4 comments
Open
1 of 2 tasks

untracked for all methods? #4268

manfredsteyer opened this issue Feb 28, 2024 · 4 comments

Comments

@manfredsteyer
Copy link

Which @ngrx/* package(s) are relevant/related to the feature request?

signals

Information

Angular is starting to untrack certain things by default:
angular/angular#54614

Since 17.1.1, Signal Store does the same for rxMethods. Should we also consider this for all other methods provided by the Signal Store? Normally, I don't want such Methods to get the caller's reactive context.

Describe any alternatives/workarounds you're currently using

a) Calling untracked by hand
b) Using toObservable (which does the same as a) underneath the covers)

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@rainerhahnekamp
Copy link
Contributor

What if we move the untracked from rxMethod to patchState? It is a simple switch but would remove a lot of headaches.

@brandonroberts
Copy link
Member

Would this be a breaking change?

@rainerhahnekamp
Copy link
Contributor

If I write code that relies on the runtime error being thrown, it could be a breaking change. But I see it is extremely rare to have such code...

In the best case, we can tell developers they can now remove their untracked orallowSignalWrites from their effects.

ATM, I tend to say it is an "acceptable breaking change".

@rainerhahnekamp
Copy link
Contributor

I tried it out, and some tests failed. I have to verify what kind of nature those failures are. Maybe that change has some implications which might be breaking...

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

No branches or pull requests

4 participants