-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript error on tabNavigator #260
Comments
I solved the issue by doing so in tab-nagivator.tsx type Props = StackScreenProps<RootStackParamList, 'TabNavigator'> | any; |
Thanks for flagging this! Would you like to submit a PR? |
That would be nice if i can do it . It;s my first PR , can you guide me please? Thank you! Appreciate your work |
and here's our contributor guide https://github.com/danstepanov/create-expo-stack/blob/main/contributing.md |
great , will do , Thanks! |
Fix Typescript error on tabNavigator roninoss#260
I have installed a project with nativewind , firebase and drawer + tabs navigator , and on drawer-navigator.tsx there is a typescript error :
Type '({ navigation }: Props) => Element' is not assignable to type 'ScreenComponentType<ParamListBase, "TabNavigator"> | undefined'.
Type '({ navigation }: Props) => Element' is not assignable to type 'FunctionComponent<{}>'.
Types of parameters '__0' and 'props' are incompatible.
Type '{}' is missing the following properties from type 'Props': navigation, route
Also if you don't use the same name on the Drawer.Screen for TabNavigator it throws another error : Type '"Tabs"' is not assignable to type '"TabNavigator"'. , You can fix this by making sure the name is the same with the component.
The text was updated successfully, but these errors were encountered: