I am converting an application from JS into TSX, but I encountered an error that I am not sure how to fix.
This is a function in my Screens.tsx file, and I have similar functions that are stacking other screens.
function ElementsStack(props: any) { return (<Stack.Navigator mode="card" headerMode="screen"><Stack.Screen name="Elements" component={Elements} options={{ header: ({ navigation, scene }) => (<Header title="Elements" navigation={navigation} scene={scene} /> ), cardStyle: { backgroundColor: "#F8F9FE" }, }} /></Stack.Navigator> )}
The props that I am sending to the Header components (it's a .js file) are throwing me this error:
Type 'string' is not assignable to type 'never'.ts(2322)
Is there any way I can work around this error? Is that something that I can fix at the Header component level?