I'm having trouble following the current views on the best practice for typing functional React Native components in TypeScript. I find many posts and threads that seem to start with one view and then over time drift to another, without clear consensus.
Is there a current view on this? For example are any of the following preferred, or something else entirely?
// Version ONE (makes most "sense" to me)const MyComponent = (props: MyComponentProps): JSX.Element => { return ( //... some JSX )}
// Version TWO (makes props a PropsWithChildren<MyComponentProps>?)const MyComponent: FC<MyComponentProps> = (props) => { return ( //... some JSX )
// Version THREE (what I have in older examples I've done, but I don't know why)const MyComponent: FC<MyComponentProps> = (props): ReactElement => { return ( //... some JSX )