You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would remove the effect watcher entry from the Watchers list after the first effect run and therefore will remove the capability to destroy all the watchers in one go via the signalMethodFn.destroy() call.
Expected behavior
We dont need to register a cleanup callback for the underlying effect used to track the signal when calling signalMethod. This will ensure that a call to signalMethodFn.destroy() will work correctly and therefore will destroy all the effects that are created via the signalMethod call
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
Which @ngrx/* package(s) are the source of the bug?
signals
Minimal reproduction of the bug/regression with instructions
The Cleanup callback registration as shown https://github.com/ngrx/platform/blob/34d18af5520bc671d9e7b3b4fda038357517f7a3/modules/signals/src/signal-method.ts#L41in the signalMethod effect gets executed on every effect run.
This would remove the effect watcher entry from the Watchers list after the first effect run and therefore will remove the capability to destroy all the watchers in one go via the signalMethodFn.destroy() call.
Expected behavior
We dont need to register a cleanup callback for the underlying effect used to track the signal when calling signalMethod. This will ensure that a call to signalMethodFn.destroy() will work correctly and therefore will destroy all the effects that are created via the signalMethod call
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
NgRx - 19.0.0
Other information
Reproduction - https://stackblitz.com/edit/github-nagwuftn?file=src%2Fmain.ts.
As you can see even after destroying the signalMethod the logging continues in the console.
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: