Is there anything like componentWillDisapear()
in RN?
Details of my issue:
I have two screens: Home and Details. My application uses 'firebase_admob' for adverts and the 'firebase_admob' (see the screenshot below) can render only fixed banner for the whole application. So when you go to other screens you see it too, but I need it only at Home screen. It means, when user navigates to Details I have to hide it. How to do it?
Note: I want to call dispose()
when a user leaves the Home screen. To render the banner you need to call show()
in BannerAd
class and when you need to hide you just call dispose.
When you go to other screens you see it too
but alsoI need this banner only at Home screen
. Can you clarify if you want the banner on all pages or just the Home page?