We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecccad6 commit c550847Copy full SHA for c550847
1 file changed
frontend/preview/preview.tsx
@@ -165,7 +165,12 @@ function initPreview() {
165
globalStore.set(getAtoms().fullConfigAtom, {} as FullConfigType);
166
GlobalModel.getInstance().initialize(initOpts);
167
loadFonts();
168
- const root = createRoot(document.getElementById("main")!);
+ const container = document.getElementById("main")!;
169
+ let root = (container as any).__reactRoot;
170
+ if (!root) {
171
+ root = createRoot(container);
172
+ (container as any).__reactRoot = root;
173
+ }
174
root.render(<PreviewRoot />);
175
}
176
0 commit comments