Then I would suggest reading this for a different approach that doesn’t rely on lifecycle events for that.