"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.
Don't use React.FC<Props> — it's the older pattern, implicitly adds children, and historically caused issues with default values. The direct Props approach is cleaner and what every modern style guide recommends.
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.