equivalent of effect using observable param, with signals #4724
Unanswered
Massimiliano-Perelli
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@Massimiliano-Perelli — check out https://ngrx.io/guide/signals/signal-method (an excellent recent addition by Rainer H). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With ComponentStore, I'm using a really powerful feature of effects which can react on a input param stream. For example if I got this effect:
getMovies = this.effect((partitionId$: Observable<string>)
and the consumer does
myStore.getMovies(partitionId$)
wherepartitionId$
it's an observable,then the getMovies code will be executed for free, each time partitionId$ emits a new value.
Since now my app is getting full of signals over observables I was asking myself if the it would be possible to have a similar functionality passing signals instead of observable.
Maybe it is already possible within signal store?
As a workaround I can also make use of toObservable, but I wonder if there is a cleaner way.
Beta Was this translation helpful? Give feedback.
All reactions