Skip to content

SD-3092 - fix: toolbar serialization for stable rendering#3248

Open
chittolinag wants to merge 1 commit into
mainfrom
gabriel/sd-3092-bug-template-builder-remounts-when-toolbar-prop-is-an-object
Open

SD-3092 - fix: toolbar serialization for stable rendering#3248
chittolinag wants to merge 1 commit into
mainfrom
gabriel/sd-3092-bug-template-builder-remounts-when-toolbar-prop-is-an-object

Conversation

@chittolinag
Copy link
Copy Markdown
Contributor

@chittolinag chittolinag commented May 12, 2026

Issue

Passing an inline object to the toolbar prop caused SuperDocTemplateBuilder to rebuild SuperDoc on every parent re-render, looping infinitely. The reason for that is that useMemo compared the object dep by reference (Object.is), so every time the parent re-renders, this would look like the toolbar also changed.

Proposed solution

Use JSON.stringify(toolbar) as the dep (same pattern as stableTelemetry in the same file).

@chittolinag chittolinag requested a review from a team as a code owner May 12, 2026 15:56
@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

SD-3092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants