"A React component is a function that takes props and returns JSX. TypeScript makes that contract explicit."
Typing functional components
The modern convention is to declare a Props type and use it as the function parameter. function Button(props: ButtonProps): React.ReactNode { ... }. The return type is usually inferred as React.ReactNode (or JSX.Element in older React types) — annotating it explicitly is optional but helpful for documentation.
React.FC<Props> is still a valid option, not a forbidden legacy API. Since the React 18 type updates it no longer adds children implicitly, so either style must list children in Props when the component accepts them. Directly annotating the function parameter is often simpler, especially for generic components; choose one style deliberately and keep the actual Props contract explicit.
Children typing
If your component accepts children, include them in Props: interface ButtonProps { children: React.ReactNode; onClick?: () => void }. React.ReactNode covers anything React can render — strings, numbers, elements, fragments, arrays, null. For specific types of children (e.g., 'only function children'), use a narrower type.
Event handler typing
React event handlers have specific types: onClick: (e: React.MouseEvent<HTMLButtonElement>) => void. The generic parameter is the element. Inline handlers usually let inference do the work — <button onClick={(e) => ...}> infers e correctly from the JSX context.