Commit eb8e446
fix(studio): break iframe ref update loop causing flickering
Fixes an infinite update loop between handlePreviewIframeRef and
NLELayout's onIframeRef effect — the callback identity change triggered the
effect which re-called the callback, creating a render loop visible as
"Maximum update depth exceeded" in dev mode and intermittent flickering in
production.
- Guard setPreviewIframe with identity check (skip if same iframe)
- Use ref for onIframeRef in NLELayout effect to avoid re-firing on
callback identity change
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2f7fcbf commit eb8e446
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
237 | 239 | | |
238 | | - | |
239 | | - | |
| 240 | + | |
| 241 | + | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| |||
0 commit comments