我在 Expo 上收到一条错误消息,显示“createBottomTabNavigator()”已移至“react-navigation-tabs”。详情请见http........
我已经完成 npm install react-navigation-tabs 并更改了我的导入,但这些更改并没有消除错误
import { createBottomTabNavigator } from 'react-navigation-tabs';
import { createAppContainer } from 'react-navigation'
import HomeScreen from './Home';
const TabNavigator = createBottomTabNavigator({
Home: HomeScreen,
SignUp: SignUpScreen
},
);
export default createAppContainer(TabNavigator);
Run Code Online (Sandbox Code Playgroud)
我希望在安装 react-navigation-tabs 并更改我的导入后,问题会得到解决。
我正在尝试使用 AWS 设置身份验证。输入用户名、密码、电子邮件并单击“注册”后,我收到一条错误消息,显示“注册错误,属性不符合架构,电子邮件:该属性是必需的”
在 AWS Cognito 中,我在用户池中选择的选项是 1.) 用户名-用户可以使用用户名和可选的多个替代项来注册和登录。2.) 在所需的标准属性下,我选择了电子邮件。
我的代码片段:
state = {
username:'',
email:'',
password:'',
confirmationCode:''
}
onChangeText(key, value) {
this.setState({
[key]: value
})
}
signUp() {
Auth.signUp({
username: this.state.username,
password:this.state.password,
attribute: {
email: this.state.email
}
})
.then(() => console.log('successful sign up'))
.catch(err => console.log('error signing up!:', err))
Run Code Online (Sandbox Code Playgroud) javascript amazon-web-services amazon-cognito react-native aws-amplify