Domain:
Frontend / Code Quality / Documentation
Difficulty:
Intermediate
Problem / steps to reproduce (for bugs)
- Many React components in the project lack proper documentation, making it harder for other developers to understand how to use them.
- Props are not clearly described, and component purpose is not explained.
- This can lead to misuse, bugs, and slower onboarding for new developers.
Expected outcome / task:
- Go through all React components and add clear documentation including:
- Component name
- Purpose / description of the component
- Props:
- Name
- Type
- Description
- Default value (if applicable)
- Events / callbacks the component emits (if any)
- Use JSDoc / TypeScript comment style for components: `ts /**
- Button component for user actions *
- @param {string} label - Text to display on the button
- @param {() => void} onClick - Callback fired when button is clicked
- @param {boolean} [disabled=false] - Disable the button */ const Button: React.FC<ButtonProps> = ({ label, onClick, disabled = false }) => { return <button onClick={onClick} disabled={disabled}>{label}</button>; };