In the ngrx store when i do select to the state and then use the object in the template multiple time with async pipe. Does this hurt preformance?
This is the code i am using :
Constructor :
this.tabs = this.store.select(s => { return s.lobby.lobbyTabs});
Template :
<div *ngIf="(tabs | async) && (tabs | async).length >0 && (tabs | async)[tabIndex].TabPositions && (tabs | async)[tabIndex].TabPositions.length > 0 && (tabs | async)[tabIndex].themeId ==1">
<div *ngFor="let i of createNumArray((tabs | async)[tabIndex].TabPositions.length)" class="column">
<app-ticket [ticket]='rooms[(tabs | async)[tabIndex].TabPositions[i-1].Id]' [themeId]='(tabs | async)[tabIndex].themeId'
[lastLobbyTimestamp]='(lastLobbyTimestamp | async)'></app-ticket>
</div>
Is there a better way to work with the async pipe?