简体   繁体   中英

How to navigate to different screen on button click in react-native android app using react-navigation

I am new to react-native. I am writing an android app. What are other options other than react-navigation to achieve navigation as I stated?. Also I would appreciate, if you could suggest links to demo for how to implement navigation for android specific app.

Use react-navigation. And on button click write

onButtonPress() {
  this.props.navigation.navigate('Second_screen');
}

Make sure this information will help you. From this you can navigate two screens.

  • You can use react-navigation package into your js file.
  • create new createStackNavigator for your class or function.

For get more details regarding connection you can follow this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM