How to use type AppStackScreenProps #2383
Unanswered
dwbelliston
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It also seems that if i change AppStackScreenProps to use NativeStackScreenProps like this:
And then Remove the extra StackScreenProps in the function type like this it seems to work:
So im wondering if the generator is correct because it add the StackScreenProps like below:
But isnt that already provided by |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, typescript generics are not something I grasp fully.. so looking for some help since i cant get this to work right.
In
AppNavigators.tsx
I have:Then, when I try to type my screen.. e.g. The LoginScreen, I do this:
I get a warning saying
So what is it suppose to be <AppStackScreenProps<"Login">> or <AppStackScreenProps, "Login">
Either way, i dont see it working. But when I do:
Notice the AppStackParamList instead of AppStackScreenProps then it works
Beta Was this translation helpful? Give feedback.
All reactions