So I can use the onEnter/onExit method at the root of my app in the router definitions and it works perfectly fine:
<Scene key="arena" hideNavBar={true} onEnter={() => console.log("Entered")} component={ArenaPage} />
Is there any way I can do this inside the component itself so that I can update the local state??
export default class ArenaPage extends Component {
onEnter () {
this.setState(...)
}
// Render blah blah blah...
}
If not possible, Is there anyway to trigger componentWillUnmount when navigating away from Scene (Actions.[key])