CLI tool to initialize a React Native application with Expo. Provides options to include Typescript, file-based routing via Expo Router, configuration based routing via pure React Navigation, styling via Nativewind, Restyle, Unistyles, StyleSheets, or Tamagui, and/or backend as a service such as Firebase and Supabase.
This PR addresses the TypeScript error encountered in drawer-navigator.tsx when assigning the TabNavigator component to a Drawer.Screen. The error was due to a type mismatch between the expected ScreenComponentType for the component prop and the actual type of TabNavigator. To resolve this, we explicitly cast TabNavigator to React.ComponentType, bypassing the strict type checking while maintaining functionality.
Additionally, this PR addresses an issue where using a different name for the TabNavigator in Drawer.Screen would result in a type error. Ensuring the name matches the component resolves this issue.
Related Issue
This PR fixes the issue reported in #260 regarding a TypeScript error with TabNavigator.
How Has This Been Tested?
Manual testing was conducted to ensure that the navigation functionality works as expected after the changes. Navigating between different screens using the drawer and tab navigators to verify that all components render correctly without any errors.
The project was compiled with TypeScript to confirm that the previously reported type errors are no longer present.
Description
This PR addresses the TypeScript error encountered in drawer-navigator.tsx when assigning the TabNavigator component to a Drawer.Screen. The error was due to a type mismatch between the expected ScreenComponentType for the component prop and the actual type of TabNavigator. To resolve this, we explicitly cast TabNavigator to React.ComponentType, bypassing the strict type checking while maintaining functionality.
Additionally, this PR addresses an issue where using a different name for the TabNavigator in Drawer.Screen would result in a type error. Ensuring the name matches the component resolves this issue.
Related Issue
This PR fixes the issue reported in #260 regarding a TypeScript error with TabNavigator.
How Has This Been Tested?
Manual testing was conducted to ensure that the navigation functionality works as expected after the changes. Navigating between different screens using the drawer and tab navigators to verify that all components render correctly without any errors.
The project was compiled with TypeScript to confirm that the previously reported type errors are no longer present.