other/skills/modern-best-practice-react-components/SKILL.md
Build clean, modern React components that apply common best practices and avoid common pitfalls like unnecessary state management or useEffect usage
npx skillsauth add academind/claude-code-course-resources modern-best-practice-react-componentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
We're using modern React (19+) and we're following common best practices focused on clarity, correctness, and maintainability.
function components over arrow functions
useEffect()
@tanstack/react-query)useState() or useReducer() usage
useMemo() sparingly and only for proven performance issuesAVOID in-line event handlers in JSX
PREFER:
function handleClick() {
// ...
}
<button onClick={handleClick} />;
Over:
<button
onClick={() => {
/* ... */
}}
/>
Name handlers clearly (handleSubmit, handleChange, handleClose)
Keep handlers small; extract complex logic into helpers
children intentionally and document expected structurememo, useCallback) unless absolutely requireddevelopment
Enforce web security and avoid security vulnerabilities
development
Build clean, scalable UIs with Tailwind CSS using modern utilities and variants
development
Utilize built-in browser APIs (like Popover API, View Transitions etc) instead of building features manually via JavaScript
development
Build modern Next.js apps with App Router and best practices