React Native Expo project shows "Screen Doesn't Exist" on reload

53 Views Asked by At

I'm trying to make a react native expo project using the expo-router's file based routing on an Android Emulator. As I start adding new routes, everything works fine until I reload the emulator. When the app reloads, I get sent to the "This screen doesn't exist." page.
"This screen doesn't exist." page.
I currently only have 2 routes, a profile route as a folder one of the default routes called "two.tsx".

app
├── (tabs)
│   ├── profile
│   │   ├── index.tsx
│   │   └── _layout.tsx
│   ├── two.tsx
│   └── _layout.tsx
├── +html.tsx
├── +not-found.tsx
├── modal.tsx
└── _layout.tsx

I haven't found any solutions for this anywhere. I've tried deleting all the routes in the (tabs) folder _layout.tsx file since i'm only just starting the project and I still get the same result.

app/(tabs)/_layout.tsx:

import React from 'react';
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { Link, Tabs } from 'expo-router';
import { Pressable } from 'react-native';

import Colors from '@/constants/Colors';
import { useColorScheme } from '@/components/useColorScheme';
import { useClientOnlyValue } from '@/components/useClientOnlyValue';

// You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
function TabBarIcon(props: {
  name: React.ComponentProps<typeof FontAwesome>['name'];
  color: string;
}) {
  return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />;
}

export default function TabLayout() {
  const colorScheme = useColorScheme();

  return (
    <Tabs
      screenOptions={{
        tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
        // Disable the static render of the header on web
        // to prevent a hydration error in React Navigation v6.
        headerShown: useClientOnlyValue(false, true),
      }}>
    </Tabs>
  );
}

I delete all the files that the old routes pointed to, same result. I tried looking for any files that's pushing to a page but there isn't any in my project.

I've even tried deleting the entire project and starting over, but still the same result.

Heres the Github, the SSDEMO folder contains the issue: https://github.com/ChaseHutcheson/React-Native

0

There are 0 best solutions below