import * as React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { RootStackScreenProps } from '../types'; export default function NotFoundScreen({ navigation }: RootStackScreenProps<'NotFound'>) { return ( This screen doesn't exist. navigation.replace('Root')} style={styles.link}> Go to home screen! ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', padding: 20, }, title: { fontSize: 20, fontWeight: 'bold', }, link: { marginTop: 15, paddingVertical: 15, }, linkText: { fontSize: 14, color: '#2e78b7', }, });