You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using create-react-native-app package, so I'm unable to run the mandatory command, but my environment is described above.
Description
I'm trying to navigate to another screen (Artist) by clicking on an element in a FlatList. This FlatList contains Artist instances, as set in the _renderListItem method. So far I've tried three different approaches (two of them commented out at the moment), but none of them seem to work:
**Method 1: NavigationActions
Method 2: this.props.navigation.navigate
Method 3: Navigator.push**
I managed to pass the params to the other screen, but unfortunately the navigation itself doesn't seem to work; I'm getting the expected values in my logs, but nothing happens and the app stays at LinksScreen (doesn't change screens).
The console.log in the beginning of the _onPress() method seem to be working (the expected params have the correct values here), but I'm unable to navigate to this screen.
I'm facing the same problem, anyone can help me?
React-Navigation doesn't change the screen in iOS simulator (run-ios), but I can see the logs of new page correctly (constructor, props...) in run-android it works fine. Tried to update libs/pods with no success...
facebook
locked as resolved and limited conversation to collaborators
Sep 26, 2019
Environment
[skip envinfo]
{
"name": "my-new-project",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"axios": "^0.18.0",
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-htmlview": "^0.13.0",
"react-navigation": "^2.16.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"jest-expo": "30.0.0"
}
}
I'm using create-react-native-app package, so I'm unable to run the mandatory command, but my environment is described above.
Description
I'm trying to navigate to another screen (Artist) by clicking on an element in a FlatList. This FlatList contains Artist instances, as set in the _renderListItem method. So far I've tried three different approaches (two of them commented out at the moment), but none of them seem to work:
**Method 1: NavigationActions
Method 2: this.props.navigation.navigate
Method 3: Navigator.push**
I managed to pass the params to the other screen, but unfortunately the navigation itself doesn't seem to work; I'm getting the expected values in my logs, but nothing happens and the app stays at LinksScreen (doesn't change screens).
Reproducible Demo
LinksScreen.js
Artist.js
The console.log in the beginning of the _onPress() method seem to be working (the expected params have the correct values here), but I'm unable to navigate to this screen.
MainTabNavigator.js
Perhaps there is something wrong regarding the routing, so here is how it's done in my case.
The text was updated successfully, but these errors were encountered: