React 18 and the React.FC Change
What you'll learn: How React 18 removed the implicit children prop from React.FC, addressing one of the main criticisms against using it.
The Historic Problem with React.FC
Before React 18, one of the strongest arguments against using React.FC was that it automatically included children in every component's props, even when you didn't want them. This was confusing and error-prone:
// Before React 18
const Button: React.FC<{ label: string }> = ({ label }) => {
return <button>{label}</button>;
};
// This worked, even though you didn't define children!
<Button label="Click">Unexpected content</Button>
You couldn't prevent children from being passed because React.FC silently added children?: ReactNode to your props type.
What Changed in React 18
React 18 removed the implicit children prop from React.FC. Now, if you want to accept children, you must explicitly declare them in your props interface:
// React 18+
const Container: React.FC<{ title: string; children: ReactNode }> = ({
title,
children
}) => {
return <div><h2>{title}</h2>{children}</div>;
};
// Without children in props, this now causes a type error:
const Button: React.FC<{ label: string }> = ({ label }) => {
return <button>{label}</button>;
};
// ❌ Error: Button doesn't accept children
Why This Matters
This change eliminated the main technical argument against React.FC. Now the choice between using React.FC or plain function typing is largely stylistic—both approaches require you to be explicit about children.
Key Takeaway: React 18 made React.FC more predictable by removing implicit children, turning the FC vs plain-function debate from a technical concern into a style preference.