Commit 357946e
refactor: tighten useEffect dependency array for showSimulationBox sync
Use the functional update form of setRenderSettings so the effect only
needs renderSettings.showSimulationBox (not the full renderSettings
object) in its dependency array. This avoids re-running the effect on
unrelated renderSettings changes and eliminates the stale-closure risk
of spreading a captured renderSettings snapshot.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2a415ce commit 357946e
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
413 | | - | |
| 412 | + | |
| 413 | + | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
0 commit comments