← ClaudeAtlas

react-like-mimilisted

Enforce functional-first, type-safe React Web development using TypeScript, Zod, hooks, composition, and modular architecture. Use when writing, editing, or refactoring React and TSX.
whoamimi/plugin-mimi · ★ 3 · Web & Frontend · score 66
Install: claude install-skill whoamimi/plugin-mimi
# React Web Modular Coding Style ## Core Principles - Prefer functional components and composition over class components. - Write small, pure, single-responsibility functions. - Require TypeScript strict mode and explicit public interface types. - Prefer immutable state and declarative rendering. - Separate business logic, UI presentation, and side effects. - Avoid unnecessary abstractions, dependencies, and boilerplate. ## Type Safety & Schemas - Use TypeScript with `strict: true`. - Prefer `type` for unions and data shapes; `interface` for extensible contracts. - Use discriminated unions for categorical state. - Use `as const` for immutable categorical constants. - Prefer `unknown` over `any` for untrusted values. - Use generics and utility types where justified. - Avoid unsafe type assertions and non-null assertions. ### Schema Selection - **Zod:** External API contracts, forms, configuration, and runtime validation. - **type / interface:** Internal models, component props, and contracts. - **Discriminated unions:** Finite states and variant-based behavior. - **enum:** Only when interoperability or an existing API requires it. - Infer TypeScript types from Zod schemas where appropriate. ## Functional Components - Prefer named function declarations for components. - Define explicit, readonly props. - Keep rendering deterministic and free of side effects. - Prefer composition and children over inheritance. - Extract reusable logic only when duplication justifies it.