I’m using a tabbar with some View as Tab tabs.
I need to unbind some events that I attach at page(of the tab) load but i can’t find the way to do that.
The first approach was to look in direction of the classical react way but I notice that componentDidMount
was fired for all tabs at first load and componentWillUnmount
is never called, I think everthing will be destroyed only at the “ends” of the app, is this correct?
Anyway, i searched in the docs (a bit confusing in my opinion) and I found various events, but none of them work.
This is my code, HOME page is the content for a TAB:
return (
<Page name="home"
onPageAfterIn={this.afterIn.bind(this)} <-- fired
onPageAfterOut={this.beforeOut.bind(this)} <-- never fired
onPageBeforeOut={this.beforeOut.bind(this)} <-- never fired
onPageBeforeRemove={this.beforeOut.bind(this)} <-- never fired
onPageBeforeUnmount={this.beforeOut.bind(this)} <-- never fired
onTabShow={this.tabShow.bind(this)} <-- never fired
>
<Navbar title="Home Page" />
</Page>
);
}