diff --git a/.changeset/neat-peaches-matter.md b/.changeset/neat-peaches-matter.md new file mode 100644 index 00000000..9288b229 --- /dev/null +++ b/.changeset/neat-peaches-matter.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools-utils': patch +--- + +fix: panel issue fix diff --git a/.changeset/thin-pianos-rhyme.md b/.changeset/thin-pianos-rhyme.md new file mode 100644 index 00000000..2e9e0d70 --- /dev/null +++ b/.changeset/thin-pianos-rhyme.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools-utils': patch +--- + +revert panel generation diff --git a/packages/devtools-utils/src/preact/panel.tsx b/packages/devtools-utils/src/preact/panel.tsx index fddf6379..35deeb0f 100644 --- a/packages/devtools-utils/src/preact/panel.tsx +++ b/packages/devtools-utils/src/preact/panel.tsx @@ -34,8 +34,6 @@ export function createPreactPanel< const devToolRef = useRef(null) const devtools = useRef(null) useEffect(() => { - if (devtools.current) return - devtools.current = new CoreClass() if (devToolRef.current) { @@ -45,6 +43,7 @@ export function createPreactPanel< return () => { if (devToolRef.current) { devtools.current?.unmount() + devtools.current = null } } }, [props?.theme]) diff --git a/packages/devtools-utils/src/react/panel.tsx b/packages/devtools-utils/src/react/panel.tsx index 274ff8b3..3d3e580a 100644 --- a/packages/devtools-utils/src/react/panel.tsx +++ b/packages/devtools-utils/src/react/panel.tsx @@ -32,8 +32,6 @@ export function createReactPanel< const devToolRef = useRef(null) const devtools = useRef(null) useEffect(() => { - if (devtools.current) return - devtools.current = new CoreClass() if (devToolRef.current) { @@ -43,6 +41,7 @@ export function createReactPanel< return () => { if (devToolRef.current) { devtools.current?.unmount() + devtools.current = null } } }, [props?.theme])