In TypeScript, a React function component is usually a function with a typed props parameter and an inferred return type. For most components, define the props contract and let the project’s JSX and React types check the returned JSX:
interface GreetingProps {
name: string;
}
function Greeting({ name }: GreetingProps) {
return <h1>Hello, {name}!</h1>;
}
“Component type” can mean either the props a component accepts or the callable function itself. When writing a component, you generally need to type its props—not add a broad component type annotation. React’s TypeScript guide demonstrates direct props typing.
Type the props parameter first
A function component receives one props object as its first argument. Type that object inline for a small, one-off component, or give it a name when the contract has several fields, is reused, or benefits from a clear public API. React’s TypeScript guide demonstrates both approaches.
type ButtonProps = {
title: string;
disabled: boolean;
};
function Button({ title, disabled }: ButtonProps) {
return <button disabled={disabled}>{title}</button>;
}
Annotate the parameter before destructuring its fields. This makes the component’s accepted props explicit and lets TypeScript check uses such as <Button title="Save" disabled={false} />.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches#1 Best Overall
Inline type or named type?
- Inline object type: suitable for a short prop list used only once.
- Named interface or type alias: easier to read and reuse when props grow or form a public component contract.
Neither syntax is mandatory. Choose the form that makes the contract clearest.
Let ordinary return types be inferred
For a typical component that returns JSX, TypeScript can infer the return type from the implementation. An explicit return annotation is not generally required just because the function is a React component.
The exact return types accepted as JSX components depend on the TypeScript, React, and React type-definition versions in the project. The TypeScript JSX handbook explains that JSX checks function components and that TypeScript 5.1 introduced JSX.ElementType, which allows JSX component eligibility to be customized by the relevant type definitions.
If you are publishing a component library or enforcing a specific public API boundary, an explicit return type may be useful. Check it against the versions your project supports rather than assuming one annotation works across every React and TypeScript setup.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Choose a children type based on what you accept
Use React.ReactNode when a prop should accept general renderable content, such as text, numbers, or JSX. Use React.ReactElement when the API specifically requires an element object rather than any renderable value. React’s TypeScript guide distinguishes these types.
interface ModalProps {
title: string;
children: React.ReactNode;
}
function Modal({ title, children }: ModalProps) {
return (
<section>
<h2>{title}</h2>
{children}
</section>
);
}
Do not use React.ReactElement merely because a value appears between a component’s opening and closing tags: it is narrower than React.ReactNode and excludes values such as strings and numbers. TypeScript also cannot express a general restriction that children must be a particular HTML tag type, such as only <li> elements.
Rank #4
React.FC is optional, not a requirement
React.FC (also called React.FunctionComponent) is one way to describe a component function, but it is not required for ordinary function components. Directly typing the props parameter is the straightforward pattern shown in React’s official guide; the function’s return type can usually remain inferred.
The useful distinction is what you are typing: the props contract, the component function, or its return value. For routine component implementation, a named props type plus inference is typically enough. For a reusable library or other explicit API boundary, make a deliberate choice based on the installed type definitions and supported versions.
Best Value
In React 19, ref can be a function-component prop
React’s React 19 announcement says that function components can access ref as a prop starting in React 19, and that new function components no longer need forwardRef. This is version-dependent: verify that the React and @types/react versions installed in your project support the pattern before using it, especially in a project on an earlier release. React’s version page listed React 19.3 as the latest version when accessed on October 4, 2026.
Render components through JSX
TypeScript typing does not change React’s runtime rule: render a component through JSX rather than calling it as an ordinary function. React needs to control when component functions run during rendering. The React documentation states, “Components should only be used in JSX. Don’t call them as regular functions.” See React calls Components and Hooks.
Quick Recap
// Render as a component
<Greeting name="Ada" />;
// Do not invoke the component directly
Greeting({ name: "Ada" });
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




