-
-
Notifications
You must be signed in to change notification settings - Fork 32
feat: vue devtools #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: vue devtools #226
Conversation
π¦ Changeset detectedLatest commit: ffc067d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
79d46e6 to
8943746
Compare
|
View your CI Pipeline Execution β for commit ffc067d
βοΈ Nx Cloud last updated this comment at |
More templates
@tanstack/devtools
@tanstack/devtools-client
@tanstack/devtools-ui
@tanstack/devtools-utils
@tanstack/devtools-vite
@tanstack/devtools-event-bus
@tanstack/devtools-event-client
@tanstack/react-devtools
@tanstack/solid-devtools
@tanstack/vue-devtools
commit: |
915c676 to
e81d8da
Compare
| const currentPlugin = store.plugins?.find( | ||
| (plugin) => plugin.id === pluginId, | ||
| ) | ||
|
|
||
| if (currentPlugin?.destroy && isActive) { | ||
| currentPlugin.destroy(pluginId) | ||
| } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
f3f0f95 to
9688a40
Compare
π― Changes
β Checklist
pnpm test:pr.π Release Impact