react-conventions

Enforce React Compiler-friendly patterns with TypeScript prop typing and Zustand references.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/bkinsey808/songshare-effect --skill react-conventions-bkinsey808
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-conventions
Source: https://github.com/bkinsey808/songshare-effect/tree/main/.github/skills/react-conventions
Command: npx skills add https://github.com/bkinsey808/songshare-effect --skill react-conventions-bkinsey808

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This set of conventions guides developers to write React code that is friendly to the React Compiler, removing the need for manual memoization and enforcing functional components with hooks patterns so performance and maintainability scale with the project.

Core Features & Use Cases

  • Compiler-ready code: Avoid manual memoization (useMemo, useCallback, memo) and rely on the compiler for optimization.
  • Functional components & hooks: Only functional components with hook-based state and effects.
  • Styling & patterns: Tailwind CSS integration and consistent styling approaches.
  • Component organization & typing: One main export per file, colocated tests, and strong TypeScript prop typings.
  • Hook patterns: Correct dependency arrays, avoidance of stale closures, and clear side-effect intent comments.
  • State & patterns references: Guidance on Zustand patterns, store composition, and common patterns with available references.

Quick Start

Refactor components to be compiler-ready and hook-based, and remove manual memoization to align with the React Compiler guidance.

Frequently Asked Questions about react-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop using useMemo and useCallback when writing React components?

To stop using useMemo and useCallback manually, adopt React Compiler-friendly patterns by writing functional components with hooks and letting the compiler handle performance optimization automatically. This removes manual memoization overhead.

What are React Compiler-friendly component patterns for TypeScript?

React Compiler-friendly patterns require functional components with explicit TypeScript prop typing, one main export per file, colocated tests, and consistent hook dependency arrays. This ensures the compiler can safely optimize renders.

Does the React Compiler work with Tailwind CSS and Zustand state management?

Yes, the React Compiler works with Tailwind CSS and Zustand. Conventions enforce consistent styling approaches and Zustand store composition patterns that remain compatible with compiler-driven optimization.

How do I refactor existing React components to be compiler-ready?

Refactor components by converting to functional components with hook-based state, removing manual memoization wrappers, adding explicit TypeScript prop typings, and annotating side-effect intent to align with React Compiler guidance.

Why does the React Compiler require consistent hook dependency arrays?

The React Compiler requires consistent hook dependency arrays to safely optimize component renders and prevent stale closures. Clear side-effect intent comments help the compiler understand execution order.

When should I not use manual memoization in React?

You should avoid manual memoization when using the React Compiler, as it automatically optimizes performance for functional components. Manual useMemo, useCallback, and memo wrappers become unnecessary overhead.