Skip to main content

React.FC

const MyApp: React.FC<ChildProps> = ({ color }) ⇒ {

const Child: React.FC<ChildProps\> = ({ color }) => {
return <div\>{color}</div\>;
};

TS will know this is a React Functional Component - default properties will work

will receive prop type of "ChildProps"

identical to longer React.FunctionComponent

FC is Generic Type

newer version don't require import React

References