I have responsive.tsx file and I want to take an useState hook as props that contains orientation mode for app from app.tsx. I have an issue with types.
Argument of type 'Dispatch<SetStateAction>' is not assignable to parameter of type 'Props'. Property 'setOrientation' is missing in type 'Dispatch<SetStateAction>' but required in type 'Props
//in responsive.tsxtype OrientationProp = { orientation:string}type Dispatcher<S> = Dispatch<SetStateAction<S>>;type Props = { setOrientation : Dispatcher<any>}const listenOrientationChange = ({ setOrientation }:Props) => { Dimensions.addEventListener("change", (newDimensions) => { // Retrieve and save new dimensions screenWidth = newDimensions.window.width; screenHeight = newDimensions.window.height; // Trigger screen's rerender with a state update of the orientation variable }); let orientation:OrientationProp = { orientation: screenWidth < screenHeight ? "portrait" : "landscape", }; setOrientation(orientation);};//in app.tsx const [orientation,setOrientation] = useState(null); useEffect(() => { listenOrientationChange(setOrientation) // the error is here //Argument of type 'Dispatch<SetStateAction<null>>' is not assignable to parameter of type 'Props'. Property 'setOrientation' is missing in type 'Dispatch<SetStateAction<null>>' but required in type 'Props' },[])