How do I bind a function outside of scope in React Native? I\'m getting the errors:
undefined is not an object evaluating this.state
&
not sure if this is the problem, but I think is code is wrong, and may be potentially causing your issue.
View Video
specifically this line onPress={this._buttonPress().bind(this)}>
you are invoking the function and binding it at the same time.
The correct way to do this would be so
onPress={this._buttonPress.bind(this)}>
this way the function will be called only onPress.