When applied to a page of a navigator, this will receive callbacks when the page is made visible and closed