I am subscribing a value from a reducer, where it will always true
. when first time i subscribes it works. but next time it's not. from my research always the value is true
if i change value to false
then it works fine.
so subscribe expect the different value to observer or unsubscription. at present I do like this:
this.store.dispatch(new actionsMc.CheckConcurrencySuccess(false));
this.store.dispatch(new actionsMc.CheckConcurrency(true));
even though I required to pass true
always i do above to subscribe my update. instead of this work around any other way is there is rxjs
any one help me?
in subscription i tried with take once
but it not working further. but looking for some other work around.
here is my subscription:
this.store.pipe(last(select(subscribe.newvalue))).subscribe(res => {
console.log('new res', res);
})
but not works. as a simple how to subscribe and unsubscribe on each value received?