I have a input data in component:
@Input() sogllist: any[] = [];
Why is the mutation approach like the one here not recommended?
public remove(e: any, sogl: any): void {
this.sogllist = this.sogllist.filter((sgl) => sgl.id !== sogl.id);
}
How to do that correctly?