Course contentsShow
← React
Lesson 2390 of 2,39651. TypeScript with React BasicsFree lesson

What React.FC Is and Does

Understand the React.FC type: automatic children prop, implicit return type, and what it adds to components.

What React.FC Is and Does

You'll learn what the React.FC type adds to function components and whether you actually need it.

The Core Idea

React.FC (or React.FunctionComponent) is a TypeScript type that wraps your component, providing built-in type definitions. It's a shortcut that automatically types the children prop and your component's return type, but it's fallen out of favor in modern React development.

Here's what React.FC does behind the scenes:

// Using React.FC
const Button: React.FC<{ label: string }> = ({ label, children }) => {
  return <button>{label}{children}</button>;
};
// children is automatically typed as ReactNode
// return type is automatically ReactElement

Compare this to the modern approach you've been learning:

// Without React.FC (preferred modern style)
const Button = ({ label, children }: { label: string; children?: ReactNode }) => {
  return <button>{label}{children}</button>;
};

What React.FC Adds

  1. Automatic children prop — typed as ReactNode | undefined, even if you don't need it
  2. Implicit return type — ensures you return valid JSX
  3. displayName, propTypes, defaultProps — adds these static properties (rarely used now)

Why It's Less Popular Now

The automatic children prop sounds convenient, but it causes confusion: components that shouldn't accept children still do. You've already learned PropsWithChildren for when you genuinely need children, which is more explicit.

The implicit return type doesn't add much value since TypeScript already infers return types well.

Key Takeaway: React.FC is a legacy convenience type that auto-includes children and types your return value, but modern React code typically skips it in favor of explicit props interfaces—giving you better control over whether children belongs in your component.