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

Team Conventions: Picking a Style

Weighing tradeoffs and choosing one pattern for consistency; most modern codebases skip React.FC.

Team Conventions: Picking a Style

What you'll learn: How to evaluate tradeoffs between typing patterns and establish a consistent TypeScript convention across your React team.

The Decision Point

You've seen both approaches: React.FC with implicit children (pre-React 18) or explicit types, and plain function components with manually typed props. Now the question isn't which is technically better, but which should your team standardize on?

Weighing the Tradeoffs

Think of coding conventions like agreeing on which side of the road to drive—the consistency matters more than the specific choice.

Most modern codebases skip React.FC for these reasons:

  • Explicitness: Props interfaces show exactly what's accepted, including children
  • Flexibility: No opinions baked in about return types or special properties
  • Simplicity: One less React-specific concept to teach new TypeScript developers
  • Future-proof: React's own documentation moved away from React.FC examples

The pattern that's winning:

interface ButtonProps {
  label: string;
  children?: ReactNode;
}

function Button({ label, children }: ButtonProps) {
  return <button>{label}{children}</button>;
}

Making the Choice

Consider your team's context:

  • New codebase? Start with plain functions—it's the direction React is heading
  • Existing patterns? Match what's already there unless you're doing a deliberate migration
  • Team experience? Less TypeScript-savvy teams benefit from simpler, explicit patterns
  • Document it: Whatever you choose, write it down in your style guide

Key Takeaway: Most teams now prefer plain function components with explicit props over React.FC, prioritizing clarity and alignment with React's modern documentation—but the real goal is picking one pattern and sticking to it consistently across your codebase.