@accelerate wrote:
Hello,
Hopefully quick question. Will a component go through its lifecycle only if its attributes change? ie, if I have
{{my-component foo=bar}}
And
bar
never changes (or it gets set to the same value as before), that means the component lifecycle will never run again, correct?The reason I ask is that I necessarily need to have some components refresh itself (by running some loading methods within the component) even if its attributes remain the same. So what I decided to do was pass in a timestamp (so in the above, I set
bar = Date.now();
). And I'm relying ondidReceiveAttrs()
to execute every time I update that timestamp so I can go through my refreshing logic. I'm wondering if this is actually an okay thing to do (paradigm-wise).
Posts: 1
Participants: 1