react-state-machines
React State Machines with XState v5
Overview
State machines make impossible states unrepresentable by modeling UI behavior as explicit states, transitions, and events. XState v5 (2.5M+ weekly npm downloads) unifies state machines with the actor model—every machine is an independent entity with its own lifecycle, enabling sophisticated composition patterns.
When to Use This Skill
Trigger patterns:
- Boolean flag explosion: multiple
isLoading,isError,isSuccessflags - Implicit states: writing
if (isLoading && !isError && data)to derive mode - Defensive coding: guards before state updates to prevent invalid transitions
- Timing coordination: timeouts, delays, debouncing across states
- State dependencies: one state depends on another to update correctly
Do not use for:
- Simple boolean toggles with no async (useState is simpler)
- Single form fields with basic validation (useReducer suffices)
- Server state caching (React Query/TanStack Query handles this)
More from bobmatnyc/claude-mpm-skills
drizzle-orm
Type-safe SQL ORM for TypeScript with zero runtime overhead
4.3Kplaywright-e2e-testing
Playwright modern end-to-end testing framework with cross-browser automation, auto-wait, and built-in test runner
2.7Kpydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
2.2Ktailwind-css
Tailwind CSS utility-first framework for rapid UI development with responsive design and dark mode
1.2Ktrpc-type-safety
tRPC end-to-end type-safe APIs for TypeScript with React Query integration and full-stack type safety
1.1Kpytest
pytest - Python's most powerful testing framework with fixtures, parametrization, plugins, and framework integration for FastAPI, Django, Flask
899