From mrp-nextjs
Build clean, modern React components that apply common best practices and avoid common pitfalls like unnecessary state management or useEffect usage
How this skill is triggered — by the user, by Claude, or both
Slash command
/mrp-nextjs:modern-best-practice-react-componentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
We're using modern React (19+) and we're following common best practices focused on
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 requirednpx claudepluginhub mrpitch/mrp-claude-plugin --plugin mrp-nextjsProvides React best practices for function components, props interfaces, compound components, useState, useEffect hooks, and state management. Useful for optimizing React code architecture and performance.
Guides writing and modifying React components with modern patterns, TypeScript, hooks for state and effects, component composition, and pitfalls to avoid. Triggers on .jsx/.tsx files or React planning.
Guides React component design with minimal state via derived values and props, atomic memoization, type-safe patterns, and optimized conditional logic. Use for creating components, state management, render optimization.