I have this code currently:
<div class="ui segment" *ngFor="let message of models | async">
<team-message [model]="message" [users]="users" (onReply)="handleMessageReply($event)"></team-message>
</div>
In testing I've noticed that any change to a message causes the affected team-message
component to be re-rendered. I currently have a collapsible Replies
section within each team-message
component that is closing everytime a user submits a reply -- collapsed is the default state -- and I do not want that to occur.
I was under the impression that this smart component/dumb(ish) component approach should not cause my 'touched' team-message
component to consistently re-render, but yet, it does.
Is there any way for me to prevent this Lifecycle Hook from getting called again, or to pass the reply open/closed state to the subsequent component?