WindsurfReactArchitecture

React Windsurf Rules

Windsurf rules for React: modern patterns, performance, and scalable React architecture.

.windsurfrules
- Use Tanstack Query v5 for all server state; local state with zustand or jotai
- Implement virtualization (TanStack Virtual) for lists over 100 items
- Use React 19 use() hook for async data in components
- Apply the Container/Presentational pattern for separation of concerns
- Use React Compiler (in React 19) to eliminate manual memo optimization
- Write tests with React Testing Library; use MSW for API mocking
- Use startTransition for non-urgent state updates to keep UI responsive
- Implement error boundaries at feature level, not just the app root

How to use with Windsurf

Create a `.windsurfrules` file in your project root. Windsurf's Cascade AI applies these rules automatically.

#react#windsurf#tanstack-query#coding-rules

Related Rules