Skip to content

fix: resolve setState-in-effect and missing deps lint errors in editor#1416

Merged
braedonsaunders merged 1 commit intomainfrom
claude/fix-mappreview-setstate-68qQ5
Feb 10, 2026
Merged

fix: resolve setState-in-effect and missing deps lint errors in editor#1416
braedonsaunders merged 1 commit intomainfrom
claude/fix-mappreview-setstate-68qQ5

Conversation

@braedonsaunders
Copy link
Owner

MapPreviewModal: Replace useEffect that clamped numPlayers with a derived value using Math.min, eliminating the synchronous setState inside an effect that caused cascading renders.

SettingsPanel: Use refs synced via useEffect for state.mapData and onUpdateObjects in the border decoration auto-regeneration effect, fixing the exhaustive-deps warning without causing unwanted effect triggers on parent re-renders.

https://claude.ai/code/session_01B6rVfPyBb24TYHZhFshRvZ

MapPreviewModal: Replace useEffect that clamped numPlayers with a
derived value using Math.min, eliminating the synchronous setState
inside an effect that caused cascading renders.

SettingsPanel: Use refs synced via useEffect for state.mapData and
onUpdateObjects in the border decoration auto-regeneration effect,
fixing the exhaustive-deps warning without causing unwanted effect
triggers on parent re-renders.

https://claude.ai/code/session_01B6rVfPyBb24TYHZhFshRvZ
@braedonsaunders braedonsaunders merged commit 7dfb3c0 into main Feb 10, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/fix-mappreview-setstate-68qQ5 branch February 10, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants