Skip to content

refactor(templates): remove React.FC usage from CLI landing page components#281

Open
gonzoblasco wants to merge 1 commit into
akd-io:developfrom
gonzoblasco:fix/277-remove-react-fc-usage-cli
Open

refactor(templates): remove React.FC usage from CLI landing page components#281
gonzoblasco wants to merge 1 commit into
akd-io:developfrom
gonzoblasco:fix/277-remove-react-fc-usage-cli

Conversation

@gonzoblasco

Copy link
Copy Markdown

Remove React.FC usage from CLI (#277)

Closes #277

Summary

Removes React.FC and FC type annotations from all landing page template components in the CLI's prod-assets directory. The website was already done in #275; this completes the CLI side.

Changes

Replaced FC<Props> / React.FC<Props> with plain function components and inline prop types across 9 components:

  • Link.tsxReact.FC<LinkProps> → plain function
  • headings.tsxFC<ComponentProps<"h1-h4">> → plain functions (H1, H2, H3, H4)
  • Container.tsxFC<ContainerProps> → plain function
  • Paragraph.tsxFC<ComponentProps<"p">> → plain function
  • InlineCode.tsxFC<ComponentProps<"code">> → plain function
  • Subtitle.tsxFC<ComponentProps<"p">> → plain function
  • Section.tsxFC<ComponentProps<"section">> → plain function
  • TechnologyGrid.tsxFC<TechnologyGridProps> → plain function
  • TechnologyGridItem.tsxFC<TechnologyGridItemProps> → plain function

Why

React.FC is discouraged in modern React because it implicitly adds children to props (even when not needed) and provides no benefit over plain function components with explicit prop types.

Verification

  • pnpm run build — clean
  • pnpm run lint — no errors
  • pnpm run unit — 9/9 tests pass
  • ✅ No remaining FC or React.FC usage in prod-assets/

…ts (akd-io#277)

Replace React.FC and FC type annotations with plain function components
and inline prop types across all 9 landing page template components.

Components updated:
- Link, Paragraph, Container, InlineCode, Subtitle
- TechnologyGrid, Section, TechnologyGridItem, headings (H1-H4)
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

@gonzoblasco is attempting to deploy a commit to the 9ty Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove React.FC usage

1 participant