Master React Navigation V5

Navigating Between Different Navigators

App/screens/Settings.js

import React from 'react';
import { Button, SafeAreaView } from 'react-native';

export default ({ navigation }) => (
  <SafeAreaView>
    <Button title="Toggle Drawer" onPress={() => navigation.toggleDrawer()} />
    <Button
      title="To Actions"
      onPress={() => {
        navigation.navigate('Tabs', {
          screen: 'Actions',
          params: { userId: 123 },
        });
      }}
    />
  </SafeAreaView>
);

Want to track your progress? Create an account with React Native School!

Continue

Join the email list to be notified of all new lessons and classes!