![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@vue/devtools-api
Advanced tools
@vue/devtools-api is a library that provides an API for Vue.js developers to create custom devtools extensions. It allows developers to hook into the Vue.js devtools and add custom inspection, logging, and debugging capabilities for their Vue.js applications.
Custom Inspector
This feature allows you to create a custom inspector in the Vue Devtools. The code sample demonstrates how to set up a custom inspector with a root node and some example state.
const { setupDevtoolsPlugin } = require('@vue/devtools-api');
setupDevtoolsPlugin({
id: 'my-custom-inspector',
label: 'My Custom Inspector',
packageName: 'my-package',
homepage: 'https://example.com',
app: app
}, api => {
api.addInspector({
id: 'my-inspector',
label: 'My Inspector',
icon: 'bug_report'
});
api.on.getInspectorTree((payload, context) => {
if (payload.inspectorId === 'my-inspector') {
payload.rootNodes = [
{ id: 'root', label: 'Root Node' }
];
}
});
api.on.getInspectorState((payload, context) => {
if (payload.inspectorId === 'my-inspector') {
payload.state = {
'Root Node': [
{ key: 'example', value: 'This is an example state' }
]
};
}
});
});
Custom Timeline Layer
This feature allows you to create a custom timeline layer in the Vue Devtools. The code sample demonstrates how to set up a custom timeline layer and add an event to it.
const { setupDevtoolsPlugin } = require('@vue/devtools-api');
setupDevtoolsPlugin({
id: 'my-custom-timeline',
label: 'My Custom Timeline',
packageName: 'my-package',
homepage: 'https://example.com',
app: app
}, api => {
api.addTimelineLayer({
id: 'my-timeline',
label: 'My Timeline',
color: 0xff0000
});
api.addTimelineEvent({
layerId: 'my-timeline',
event: {
time: Date.now(),
data: {
message: 'This is a custom timeline event'
}
}
});
});
Custom State Inspector
This feature allows you to create a custom state inspector in the Vue Devtools. The code sample demonstrates how to set up a custom state inspector with a root node and some example state.
const { setupDevtoolsPlugin } = require('@vue/devtools-api');
setupDevtoolsPlugin({
id: 'my-custom-state',
label: 'My Custom State',
packageName: 'my-package',
homepage: 'https://example.com',
app: app
}, api => {
api.addInspector({
id: 'my-state-inspector',
label: 'My State Inspector',
icon: 'storage'
});
api.on.getInspectorTree((payload, context) => {
if (payload.inspectorId === 'my-state-inspector') {
payload.rootNodes = [
{ id: 'state-root', label: 'State Root' }
];
}
});
api.on.getInspectorState((payload, context) => {
if (payload.inspectorId === 'my-state-inspector') {
payload.state = {
'State Root': [
{ key: 'exampleState', value: 'This is an example state value' }
]
};
}
});
});
React DevTools is a set of tools that allows you to inspect the React component hierarchy, view props and state, and debug your React applications. It provides similar functionalities to @vue/devtools-api but is specifically designed for React applications.
Redux DevTools is a set of tools that allows you to inspect and debug the state changes in your Redux store. It provides functionalities similar to @vue/devtools-api but is focused on Redux state management.
MobX DevTools is a set of tools that allows you to inspect and debug the state changes in your MobX store. It provides functionalities similar to @vue/devtools-api but is focused on MobX state management.
Plugins API for easier DevTools integrations.
Please follow the documentation at devtools.vuejs.org.
FAQs
> Plugins API for easier DevTools integrations.
The npm package @vue/devtools-api receives a total of 18,691 weekly downloads. As such, @vue/devtools-api popularity was classified as popular.
We found that @vue/devtools-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.