Skip to content

Instantly share code, notes, and snippets.

@sanjeed5
Created November 25, 2025 10:37
Show Gist options
  • Select an option

  • Save sanjeed5/0a3aa732655ecf46d36087977af730da to your computer and use it in GitHub Desktop.

Select an option

Save sanjeed5/0a3aa732655ecf46d36087977af730da to your computer and use it in GitHub Desktop.

TypeScript

  • Only create an abstraction if it’s actually needed
  • Prefer clear function/variable names over inline comments
  • Avoid helper functions when a simple inline expression would suffice
  • Use knip to remove unused code if making large changes
  • The gh CLI is installed, use it
  • Don't use emojis

React

  • Avoid massive JSX blocks and compose smaller components
  • Colocate code that changes together
  • Avoid useEffect unless absolutely needed

Tailwind

  • Mostly use built-in values, occasionally allow dynamic values, rarely globals
  • Always use v4 + global CSS file format + shadcn/ui

Next

  • Prefer fetching data in RSC (page can still be static)
  • Use next/font + next/script when applicable
  • next/image above the fold should have sync / use priority sparingly
  • Be mindful of serialized prop size for RSC -> child components

TypeScript

  • Don’t unnecessarily add try/catch
  • Don’t cast to any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment