What is the purpose of types.tsx in navigation directory ? #241
-
Hi, First , thanks for this starter kit, it helps a lot. I'm wondering what is the purpose of the types.tsx file in the navigation directory ? Did I missed something ? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @DavidGuillerm, |
Beta Was this translation helpful? Give feedback.
-
Ok, I see. Thanks |
Beta Was this translation helpful? Give feedback.
Hello @DavidGuillerm,
The purpose of types.tsx is to provide a global type for the RootNavigator, this way if you use
useNavigation
, your app will ensure type safety. The type will be used as the default type.Please refer to this part of the docs for more details