Skip to content
Source
Sign inSign up
TanStack/devtools
Open History to see the last commit

README.md

51 lines1.1 KB

1# @tanstack/solid-devtools
2​
3This package is still under active development and might have breaking changes in the future. Please use it with caution.
4​
5## Usage
6​
7```tsx
8import { TanStackDevtools } from '@tanstack/solid-devtools'
9import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools'
10​
11function App() {
12 return (
13 <div>
14 <h1>My App</h1>
15 <TanStackDevtools
16 plugins={[
17 {
18 name: 'TanStack Router',
19 render: <TanStackRouterDevtoolsPanel router={router} />,
20 },
21 ]}
22 />
23 </div>
24 )
26```
27​
28## Creating plugins
29​
30In order to create a plugin for TanStack Devtools, you can use the `plugins` prop of the `TanStackDevtools` component. Here's an example of how to create a simple plugin:
31​
32```tsx
33import { TanStackDevtools } from '@tanstack/solid-devtools'
34​
35function App() {
36 return (
37 <div>
38 <h1>My App</h1>
39 <TanStackDevtools
40 plugins={[
41 {
42 id: 'your-plugin-id',
43 name: 'Your Plugin',
44 render: <CustomPluginComponent />,
45 },
46 ]}
47 />
48 </div>
49 )
51```