Comprehensive React Flow (@xyflow/react) patterns and best practices for building node-based UIs, workflow editors, and interactive diagrams. Use when working with React Flow for (1) building flow editors or node-based interfaces, (2) creating custom nodes and edges, (3) implementing drag-and-drop workflows, (4) optimizing performance for large graphs, (5) managing flow state and interactions, (6) implementing auto-layout or positioning, or (7) TypeScript integration with React Flow.
95
95%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
This file defines the structure and organization of React Flow usage rules.
Prefix: setup-
Impact: CRITICAL
Description: Essential patterns for initializing and configuring React Flow properly.
Prefix: node-
Impact: HIGH
Description: Best practices for creating, customizing, and managing nodes.
Prefix: edge-
Impact: HIGH
Description: Patterns for edge creation, customization, and connection handling.
Prefix: hook-
Impact: MEDIUM
Description: Proper usage of React Flow hooks for state management and interactions.
Prefix: perf-
Impact: CRITICAL
Description: Patterns to maintain performance with large graphs and frequent updates.
Prefix: layout-
Impact: MEDIUM
Description: Auto-layout, positioning, and viewport management patterns.
Prefix: interaction-
Impact: MEDIUM
Description: User interaction handling like drag-drop, selection, and context menus.
Prefix: state-
Impact: HIGH
Description: Patterns for managing flow state, save/restore, and undo/redo.
Prefix: typescript-
Impact: MEDIUM
Description: TypeScript patterns for type-safe React Flow applications.