Clean React Functional Component

frontend
TypeScript
scaffolding
minimalist
Remix

Generates a clean, typed React functional component with props interface.

12/8/2025

Prompt

Clean React Functional Component

Create a React functional component named [ComponentName] with TypeScript.

Requirements

  • Props defined in interface [ComponentName]Props
  • Use destructuring for props
  • Proper typing for:
    • children
    • className
    • Any custom props
  • JSDoc comments explaining the component purpose
  • Semantic HTML structure
  • Export as default

Example Structure

interface [ComponentName]Props {
  children?: React.ReactNode;
  className?: string;
  // custom props here
}

/**
 * [Component purpose description]
 */
export default function [ComponentName]({ children, className }: [ComponentName]Props) {
  return (
    <div className={className}>
      {children}
    </div>
  );
}

Tags

react
typescript
component

Tested Models

gpt-4
claude-3-opus

Comments (0)

Sign in to leave a comment

Sign In