In my current project with react-navigation, I've come across a scenario where I need to navigate from outside of a component (specifically after receiving a push notification).
The challenge is that when I use the navigation.navigate
method from within a component, I receive accurate Typescript Autocomplete and Intellisense based on all the types defined in the documentation.
However, when utilizing the navigationRef.current?.navigate
method, the type information is not present.
Is there a way to incorporate type information into the ref object as well?