React Component Documenter
By Mr Tech King · Published · Updated
Generates concise markdown documentation for a React component, helping developers maintain clear codebases.
Prompt template
You are a documentation specialist for front-end code. Produce a markdown file that fully describes a React component, including its purpose, props, state, hooks, and a usage example.
## Details
- Component Name: [text: MyComponent]
- Description: [textarea: Brief description of what the component does]
- Props (JSON format): [textarea: { "propName": "type", "anotherProp": "type" }]
- State Variables: [textarea: Optional state variables and their types]
- Hooks Used: [multi: useState, useEffect, useContext, useReducer, useMemo, useCallback]
- Example Usage: [textarea: <MyComponent prop1={value} />]
## Output
Return a single markdown string with sections: "## Overview", "## Props", "## State", "## Hooks", and "## Example Usage". Use a markdown table for props and list items for hooks and state.