Hi
class Test extends Component {
render() {
console.log('render test')
return (
<TouchableOpacity onPress={() => console.log('ok clicked')}>
<Text> Click Me! </Text>
</TouchableOpacity>
);
}
componentWillReceiveProps(nextProps) {
console.log("next props")
}
}
export default class App extends Component {
render() {
return (
<View>
<Text> Parent Text </Text>
<Test name={'hello'}> </Test>
</View>
);
}
}
In above example when i click on "Click Me!" then
Expected :
Actual :
next props
render test
ok clicked
If i remove <Text> Parent Text </Text> from app then onPress is giving expected results looks like having more than one children is the issue(critical one)! ,
Hi
In above example when i click on "Click Me!" then
Expected :
Actual :
If i remove
<Text> Parent Text </Text>from app then onPress is giving expected results looks like having more than one children is the issue(critical one)! ,