react-best-practices

Enforce React and TypeScript frontend patterns with TanStack Query and Zustand.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/buildworksai/EUCORA --skill react-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-best-practices
Source: https://github.com/buildworksai/EUCORA/tree/main/.agents/skills/react-best-practices
Command: npx skills add https://github.com/buildworksai/EUCORA --skill react-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

EUCORA frontend teams face inconsistent React + TypeScript patterns across components, leading to longer development cycles, integration issues, and maintenance debt. This Skill provides a standardized set of patterns aligned with EUCORA's tech stack to improve reliability and velocity.

Core Features & Use Cases

  • Contracts.ts pattern: Ensure type safety and stable API contracts.
  • State management: TanStack Query for server state, Zustand for client UI state.
  • UI & components: shadcn/ui + Radix UI guidelines for consistent visuals.
  • Forms & validation: React Hook Form + Zod patterns.
  • Styling: Tailwind CSS with semantic colors and dark mode.
  • Use Case: When building a frontend domain, apply these patterns to maintain consistency and reduce boilerplate.

Quick Start

Start by locating a frontend domain, ensure a contracts.ts exists, wire API calls through ENDPOINTS, and replace any Redux usage with Zustand for UI state and TanStack Query for data fetching.

Frequently Asked Questions about react-best-practices

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

FAQPage Schema
How do I structure React components with TypeScript to enforce type safety across my frontend?

Use contracts.ts to define stable API types and wire all calls through ENDPOINTS, ensuring TypeScript catches type mismatches at build time. This pattern centralizes type definitions and prevents integration drift across components.

What's the best way to manage state in React when using TanStack Query and Zustand?

Use TanStack Query for server state and data fetching, and Zustand for client-side UI state. This separation reduces boilerplate, keeps data fetching logic testable, and avoids the complexity of libraries like Redux or MobX.

How do I build consistent React components with shadcn/ui and Tailwind CSS?

Combine shadcn/ui components with Radix UI for accessible primitives and Tailwind CSS with semantic colors and dark mode support. This creates uniform styling across domains and reduces custom CSS maintenance.

Can I use React Hook Form and Zod for form validation in a TypeScript frontend?

Yes. React Hook Form paired with Zod provides runtime and compile-time validation, reducing form bugs and boilerplate. Define Zod schemas alongside your contracts.ts for end-to-end type safety.

Why should I migrate from Redux to Zustand for UI state management?

Zustand is simpler to set up, requires less boilerplate, and integrates cleanly with TanStack Query for server state. It reduces cognitive overhead while maintaining predictable state patterns aligned with EUCORA standards.

What libraries should I avoid when building React frontends following these patterns?

Avoid Redux, Next.js, and MobX. This Skill enforces TanStack Query for server state, Zustand for UI state, and standard React patterns to maintain consistency and reduce incompatible dependencies across projects.