I’m new to NGXS in Angular and I have read that you don’t need to unsubscribe when you use the async pipe. However I’m also subscribing from the queryParams and I’m subscribing from the dispatches action. Do I need to unsubscribe from this 2 codes below?
this.route.queryParamMap
.pipe(map(params => params.get('page')))
.subscribe((page: any) => {
this.page = page;
console.log(page);
});
this.store.dispatch(new AddEmployee(form.value)).subscribe(() => {
form.reset();
this.modalReference.close();