diff --git a/packages/r3f/src/extension/index.ts b/packages/r3f/src/extension/index.ts index 6e9839a..d28e1b5 100644 --- a/packages/r3f/src/extension/index.ts +++ b/packages/r3f/src/extension/index.ts @@ -150,7 +150,10 @@ const r3fExtension: IExtension = { root.render(React.createElement(SnapshotEditor, {paneId})) function unmount() { - root.unmount() + // gotta unmount in the next tick, otherwise react will complain https://github.com/facebook/react/issues/25675 + setTimeout(() => { + root.unmount() + }, 0) } return unmount },