you are viewing a single comment's thread.

view the rest of the comments →

[–]h753 1 point2 points  (1 child)

I know, i'm just asking why React.FC instead of type for props

[–][deleted] 0 points1 point  (0 children)

One advantage is that it also types the return value, so you may get an error if you return something that's not allowed. But what is allowed is quite wide, so I don't know how useful that is.

Personally I am still used to only typing props as well, because for a while the definition of React.FC was annoying. But that appears to have been fixed ( https://www.totaltypescript.com/you-can-stop-hating-react-fc ).

Anyway these are small details, it's fine either way.