React Navigation

  • yarn add react-navigation

  • Yarn add react-native-reanimated react-native- Gear-handler React-native – screen@ ^1.0.0-alpha.23

  • cd ios

  • pod install

  • cd .. /

  • Restart the react-native run-ios command

  • Liverpoolfc.tv: demo

          import React from 'react';
          import { View, Text } from 'react-native';
          import { createAppContainer } from 'react-navigation';
          import { createStackNavigator } from 'react-navigation-stack';
          
          class HomeScreen extends React.Component {
            render() {
              return (
                <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
                  <Text style={{color: 'red'}}>Home Screen</Text>
                </View>
              );
            }
          }
          
          const AppNavigator = createStackNavigator({
            Home: {
              screen: HomeScreen,
            },
          });
          
          export default createAppContainer(AppNavigator);
    Copy the code