I am trying to add types to my TS version of this function, and am having a bit of trouble.
From the React Navigation docs:
// RootNavigation.jsimport { createNavigationContainerRef } from '@react-navigation/native';export const navigationRef = createNavigationContainerRef()export function navigate(name, params) { if (navigationRef.isReady()) { navigationRef.navigate(name, params); }}// add other navigation functions that you need and export them
I am using Typescript and want to add types to the params navigate(name, params)
but I can't quite figure out what they should be. Any thoughts?
I already have the container typed like so:
export const navigationRef = createNavigationContainerRef<RootStackParamList>()