Clean React Functional Component
frontend
TypeScript
scaffolding
minimalist
Generates a clean, typed React functional component with props interface.
By mike_codes
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:
childrenclassName- 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