I’m creating the conditions to call a function(or do whatever) when updating.
When the attribute is dynamic I can easily identify it because the updatedProps will change
In this example I can filter out the first 3 update calls.
However when an attribute resolves directly the 4 calls will be made.
I can declare a variable and use it as flag to stop this but I wanted to know if there is a good practice to handle this and filter out the 3 final calls.
The update is called each time something on the page called requestUpdate. In the render method you do your initial logic, for example generating the avatar when this.props.seed has a value. In the update method you check when the seed was changed, you do that by comparing props.seed with this.props.seed or by checking if the updatedProps has seed in it. If it was changed you want to regenerate the avatar, if nothing was changed you ignore the update.