The code below doesn't work for me, onExit is not executed.
componentDidMount() {
Actions.refresh({
onExit: () => {
console.log('DEBUG', this.state)
}
});
}
No, it is not possible and it is anti-pattern (because unnecessary nav state change). Just try Actions.refs.SCENE_NAME to use your component instance from static onExit/onEnter (you can define onEnter/onExit as STATIC functions for your component)
@aksonov And is there a way I can access the state of the component from onExit?
Actions.refs.SCENENAME
22 авг. 2017 г., в 18:10, Dombi Soma notifications@github.com написал(а):
@aksonov And is there a way I can access the state of the component from onExit?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Hello, I have been searching but I cannot find an example of how to use Actions.refs.SCENENAME to handle onExit from inside the component. Can someone please point me to an example? Thanks!