P
⚡ProductiviteIntermediateAll AIs

React Component with TypeScript

Creating reusable, well-typed UI components

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Create a React component in TypeScript for [COMPONENT_DESCRIPTION]. The component should: accept typed props via an interface, handle loading and error states, be accessible (ARIA), include unit tests with React Testing Library, and use [CSS_SOLUTION] for styling. Also provide a Storybook file.

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Use Cases

Creating reusable, well-typed UI components

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Séparez la logique métier du rendu : créez un hook personnalisé (`useMonComposant`) pour gérer les états (loading/error/success) et un composant présentational pur. Cela rend les tests unitaires plus ciblés (testez le hook avec `renderHook`) et allège la documentation Storybook (exposez plusieurs stories : loading, erreur, données).

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

⚡ProductiviteIntermediateAll AIs

Punchy Introduction

Introduction Writing

344
⚡ProductiviteBeginnerAll AIs

Prompt to Write a Professional Quote Request Email

A complete prompt to generate a structured, professional and customizable quote request email adapted to your industry and recipient.

334
⚡ProductiviteBeginnerAll AIs

Convert CSS to Tailwind

Migrate from standard CSS to Tailwind CSS

344
⚡ProductiviteAdvancedAll AIs

Existing Content Audit

Content asset cleanup and optimization

334