Skip to content

Instantly share code, notes, and snippets.

View jnelken's full-sized avatar
🍍

Jake Nelken jnelken

🍍
View GitHub Profile
@jnelken
jnelken / CLAUDE.md
Created August 21, 2025 15:48
Global CLAUDE.md guidelines for React TypeScript projects

Guidelines for React TypeScript projects

Architecture

  • When creating new projects, use Next.js
  • If a React component file is longer than 150 lines, check if it can be refactored into smaller components. Oftentimes, the JSX can be broken into smaller individual ui components, and the state logic can be extracted into custom hooks.
  • When asked to combine two components into a shared component, avoid If/else statements inside the shared component by passing all unique values as props or boolean flags.
  • In a React project, if you have a choice to use HTML state management, do not use it. Always default to standard React state management instead with controlled inputs.

Component Extraction and Reusability