File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
packages/devtools-utils/src/react Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @tanstack/devtools-utils ' : patch
3+ ---
4+
5+ revert panel generation
Original file line number Diff line number Diff line change @@ -32,16 +32,18 @@ export function createReactPanel<
3232 const devToolRef = useRef < HTMLDivElement > ( null )
3333 const devtools = useRef < TCoreDevtoolsClass | null > ( null )
3434 useEffect ( ( ) => {
35- const instance = new CoreClass ( )
36- devtools . current = instance
35+ if ( devtools . current ) return
36+
37+ devtools . current = new CoreClass ( )
3738
3839 if ( devToolRef . current ) {
39- instance . mount ( devToolRef . current , props ?. theme ?? 'dark' )
40+ devtools . current . mount ( devToolRef . current , props ?. theme ?? 'dark' )
4041 }
4142
4243 return ( ) => {
43- instance . unmount ( )
44- devtools . current = null
44+ if ( devToolRef . current ) {
45+ devtools . current ?. unmount ( )
46+ }
4547 }
4648 } , [ props ?. theme ] )
4749
You can’t perform that action at this time.
0 commit comments