我有一个页面,如果他/她登录将呈现用户的名字,如果他/她没有,则会创建"创建帐户"或"登录"选项.屏幕如下
他们可以导航到"登录"或"创建帐户"页面.成功登录或注册后,它将导航到此页面,并显示用户名.屏幕如下
目前,我存储用户数据AsyncStorage,我想在用户成功登录后更新此字段,或者在从页面重定向时注册.
我怎样才能做到这一点?
有没有办法传递param navigate.goBack(),父母可以听取参数并更新其状态?
我们如何从导航器条目中打开链接?例如,例如:
const Home = DrawerNavigator ({
Account: { screen: Account },
Availability: { screen: Availability },
Favorites: { screen: Favorites },
Website: { screen: Linking.openURL('http://www.example.com') }, }
Run Code Online (Sandbox Code Playgroud) javascript navigation navigation-drawer react-native side-menu
我尝试在mt应用程序上实现Expo Notification,非常有线,在我的上一个expo应用程序中它运行良好,但是现在不行了,也许是因为当我尝试expo文档中的代码时显示的是版本更新
Error: Couldn't get GCM token for device
Run Code Online (Sandbox Code Playgroud)
这是pacage.json:
我的package.json:
{
"name": "blabla",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"es6-symbol": "^3.1.1",
"expo": "^29.0.0",
"firebase": "^5.4.1",
"mobx": "^4.3.1",
"mobx-react": "^5.1.0",
"react": "16.3.1",
"react-native": "~0.55.2",
"react-native-animatable": "^1.3.0",
"react-native-ionicons": "^0.2.2",
"react-native-progress": "^3.5.0",
"react-native-simple-toast": "0.0.8",
"react-navigation": "^2.11.0"
} …Run Code Online (Sandbox Code Playgroud)