The concepts are all spot on! 👏

You do however, make a mistake that so many others do as well: you’re calling functions on your template inputs! Only call functions in a template in response to events / outputs: like `(click)=”onClick()”`

Put a `console.log` in this function and see how often it gets called… such as whenever the mouse rolls over the component. 😬 The more you do this, the more it kills performance.

You can refactor this by changing the `flags` input to be a setter function, and have set a member variable with the results of ‘Object.keys(flags)’. It’ll only run when the input changes. 👍

Lead Software Architect and AWS Solutions Architect, specializing in cloud native development as well as web clients. Also, a square dance caller. 🤷‍♂️🕺🏻