react-dev

Create type-safe React components and hooks in TypeScript for React 18/19.

Updated Jun 17, 2025
One-click install
npx skills add https://github.com/KlotzJesse/krauss-map --skill react-dev-klotzjesse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-dev
Source: https://github.com/KlotzJesse/krauss-map/tree/main/.agents/skills/react-dev
Command: npx skills add https://github.com/KlotzJesse/krauss-map --skill react-dev-klotzjesse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing React components with TypeScript often leads to inconsistent typings, boilerplate, and drift between client/server components and routing patterns. This skill provides a consolidated set of type-safe React patterns for TS, including Server Components and type-safe routing integration (TanStack Router, React Router).

Core Features & Use Cases

  • Type-safe component props, event typings, and hook patterns for React components
  • Server Components, Server Actions, and type-safe routing integration
  • Practical, copy-ready examples and on-demand references for deep dives

Quick Start

Implement a simple typed React component with a couple of props and a typed event.

Frequently Asked Questions about react-dev

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

FAQPage Schema
How do I type React component props and event handlers in TypeScript?

To type React component props and event handlers in TypeScript, define explicit prop interfaces and apply React's built-in event types. This ensures consistent typing across components and hooks, eliminating boilerplate and preventing type drift in your project.

What is the best way to achieve type-safe routing with React Router or TanStack Router?

Achieve type-safe routing with TanStack Router or React Router by integrating typed route definitions and link components. This approach validates path parameters and search params at compile time, ensuring end-to-end type safety across your navigation workflow.

How do I type Server Components and Server Actions in React 18 and 19?

Type Server Components and Server Actions in React 18 and 19 by defining explicit boundaries between server and client execution. Apply TypeScript types to server-side data fetching and mutation functions to maintain end-to-end type safety across your application.

Do I need TypeScript 5.0+ for type-safe React patterns?

Yes, you need TypeScript 5.0+ alongside React 18 or 19 to implement these type-safe React patterns. This version requirement ensures proper support for advanced typing features, Server Components, and routing integration needed for end-to-end type safety.

Why does my TypeScript React hook typing drift between components?

TypeScript React hook typing drifts between components due to inconsistent generic constraints and implicit return types. Consolidating your hook patterns with shared generic utilities and explicit type definitions resolves this drift and maintains type safety.

Can I use generic utilities to reduce TypeScript boilerplate in React hooks?

Yes, you can use generic utilities to reduce TypeScript boilerplate in React hooks. By creating reusable generic functions and typed hook patterns, you eliminate repetitive type declarations and ensure consistent type inference across your project's components.