typescript devx improvement for navigator #11814
robMolloy
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have made few utility classes to make the typing easier for each screen. I'm not familiar with react native/navigator terminology so please feel free to point out where it is incorrect.
I'm decent with typescript but I've never used react-native before today so there could easily be something I've missed
app.tsx is now as follows
And if you want to create the type for the DetailsScreen, for example, you can just do the following;
The implementation of utility types are as follows;
Beta Was this translation helpful? Give feedback.
All reactions