Skip to content

Conversation

@DamianOsipiuk
Copy link

🎯 Changes

βœ… Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

πŸš€ Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@changeset-bot
Copy link

changeset-bot bot commented Oct 21, 2025

πŸ¦‹ Changeset detected

Latest commit: ffc067d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@tanstack/vue-devtools Minor
@tanstack/devtools Patch
@tanstack/react-devtools Patch
@tanstack/solid-devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Oct 22, 2025

View your CI Pipeline Execution β†— for commit ffc067d

Command Status Duration Result
nx affected --targets=test:format,test:eslint,t... βœ… Succeeded 1m 39s View β†—
nx run-many --targets=build --exclude=examples/** βœ… Succeeded 4s View β†—

☁️ Nx Cloud last updated this comment at 2025-10-24 22:24:48 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 22, 2025

More templates

@tanstack/devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools@226

@tanstack/devtools-client

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-client@226

@tanstack/devtools-ui

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-ui@226

@tanstack/devtools-utils

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@226

@tanstack/devtools-vite

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-vite@226

@tanstack/devtools-event-bus

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-event-bus@226

@tanstack/devtools-event-client

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-event-client@226

@tanstack/react-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/react-devtools@226

@tanstack/solid-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/solid-devtools@226

@tanstack/vue-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/vue-devtools@226

commit: ffc067d

Comment on lines +50 to +56
const currentPlugin = store.plugins?.find(
(plugin) => plugin.id === pluginId,
)

if (currentPlugin?.destroy && isActive) {
currentPlugin.destroy(pluginId)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed exaclty?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vue does not follow React convention of running render all the time. It creates component once and then relies on the reactivity system.

So if we just keep the component in ref without removing/adding it, it would not trigger Teleport re-rendering.

This means that you will remove the div that devtools panel was teleported to, it will remove the panel, but re-adding the div would not re-add the panel, as Teleport would not re-run.

Therefore we need a hook on panel hide to remove it from the ref so mounting it again would trigger a new render.

Apart from that, hiding the panel should ideally clean it up without keeping it in memory indefinitely as you might not need it for that particular session. It will eat less memory as a result.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants