i try to pass onChangeText() to a child component in react native,its worked :
onChangText(value){
console.log(value)
}
render() {
return (
<View style={{flex:1}}>
<Ui
onChangeText={this.onChangText()}
/>
</View>
)
}
but when i call other function's(in parent) like below:
loger(value){
console.log(value)
}
onChangText(value){
this.loger(value)
}
render() {
return (
<View style={{flex:1}}>
<Ui
onChangeText={this.onChangText()}
/>
</View>
)
}
i got error: this.loger is not a function