mirror of
https://github.com/TanStack/devtools.git
synced 2026-11-16 10:49:48 +00:00
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
History
|
|
|---|---|---|
| .. | ||
| bin | ||
| skills | ||
| src | ||
| tests | ||
| CHANGELOG.md | ||
| eslint.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.docs.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vite.config.ts | ||
@tanstack/devtools
This package is still under active development and might have breaking changes in the future. Please use it with caution.
General Usage
import { TanStackDevtoolsCore } from '@tanstack/devtools'
const devtools = new TanStackDevtoolsCore({
options: {
// your options here
},
plugins: [
// your plugins here
],
})
devtools.mount(document.getElementById('your-devtools-container')!)
Creating plugins
In order to create a plugin for TanStack Devtools, you can use the plugins arg of the TanStackDevtoolsCore class. Here's an example of how to create a simple plugin:
import { TanStackDevtoolsCore } from '@tanstack/devtools'
const devtools = new TanStackDevtoolsCore({
config: {
// your config here
},
plugins: [
{
id: 'my-plugin',
name: 'My Plugin',
render: (el) => (el.innerHTML = '<div>My Plugin Content</div>'),
},
],
})