mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 10:23:41 +00:00
Moved state synchronization logic from render phase to useEffect hooks to prevent potential infinite loops and unpredictable behavior. Implemented ref-based previous value tracking to detect genuine parent prop changes without causing cascading renders. Changes: - Replaced direct setState calls during render with properly structured useEffect hooks - Added prevOffsetRef and prevRotationRef to track previous prop values - Documented the "partially controlled" pattern needed for Konva drag interactions - Added justified ESLint disable comments for legitimate setState-in-effect usage This fixes a critical React anti-pattern that could cause performance issues and render loops. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| useCanvasViewport.ts | ||
| usePatternTransform.ts | ||