I just started looking at React Native Basics. I learned React earlier and I see that React Native core components have listeners included (onChangeText) as opposed to React, where we must bind listeners and create functions ourself. How could I make function in React Native?
This

Into something like this

Adam Bene
Founder & CTO @ Bene Studio | Join us!
It's almost OK, just have to bind your event handler to have the
thisreference to reference your component.Option a) define your method as arrow function
... onButtonPress = () => { //... } ...Option b) bind explicitly
onPress={this.onButtonPress.bind(this)}Option c) bind implicitly
onPress={(event) => this.onButtonPress(event)}Cheers!
See more React Native and JavaScript stuff at blog.benestudio.co