我理解代码执行优先级
1-构造函数
render() {
return ({ this.authed == '' && <this.Nauthedcard /> });
}
2-然后是渲染功能
Nauthedcard()
{
console.log(this.props.navigation); // makes error (this.props is undefined)
return(<Button onPress={() => this.props.navigation.navigate('Home')} rounded small iconRight>
<Text> Login </Text>
<Icon type="FontAwesome" name="sign-in" />
</Button>); // so unfortunately onPress event here makes error with me
}
3-这里的问题 - 它将this.navigation视为未定义
<?php
$a = $_POST['myVar'];
include "ScriptB.php";