Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Typescript & react-navigation: Type Information on NavigationContainer ref?

$
0
0

I am using react-navigation & I have encountered a use case where I need to navigate from outside a component (navigation after receiving push notification).

The issue is, when using the navigation.navigate method from inside a component, I get proper Typescript Autocomplete and Intellisense based on all the types defined as per the documentation.

However, when using the navigationRef.current?.navigate method, type information is absent.

Is there any way to bring type information to the ref object too?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>