calling this.props.navigation.dispatch(resetAction);
inside componentWillMount()
works fine for me, but if I try this code
componentWillMount(){
Keychain
.getGenericPassword()
.then(function(credentials) {
this.props.navigation.dispatch(resetAction);
})
}
I get an error telling me that this.props.navigation is undefined. I suppose that the problem is that I am calling it inside .then. Do you know how can I solve this?
No comments:
Post a Comment