I am working in quite a big project that has some history and I come across different syntax when typing component.
The one existing is
const StarsContainer: React.FC<StarsContainerProps> = ({
result,
isQuizBegin,
}: StarsContainerProps) => {
...
}
I find that declaring twice the props is redundant and I think the second one can be omitted. But also am I wondering if it's not better to omit 'React.FC' which the type inference will give JSX.Element
Basically resulting in this
const StarsContainer = ({
result,
isQuizBegin,
}: StarsContainerProps) => {
...
}
Which solution is better in your opinion ?
I want to get my code simple to read while keeping type safety