I have 3 simple react components-
First the actual view(let us name this screen A)-
return(
<ImageBackground
...
>
<ScrollView>
<ChildButton
onPress={this.someFunction.bind(this)}
/>
</ScrollView>
</ImageBackground>
)
Then there is the ChildButton component---
return(
<ChildButton>
<Button
style={...someStyleObject}
onPress={this.props.onPress}
>
</Button>
</ChildButton>
)
and then there is Button component ---
return (
<TouchableOpacity
onPress={this.props.onPress}
>
{this.props.children}
</TouchableOpacity>
)
The main problem here is my onPress is not getting called from screen A, only on Android. It is working fine on iOS. What are the possible causes here?
Note: I've put consoles inside ChildButton and Button component and they are not getting printed.