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

main.tsx

38 lines970 Bytes

1import React from 'react'
2import { createRoot } from 'react-dom/client'
3import { TanStackDevtools } from '@tanstack/react-devtools'
4import { EventProbePanel } from '@tanstack/devtools-e2e/event-probe'
5​
6function DemoPlugin() {
7 return <div data-testid="demo-plugin">demo plugin content</div>
8}
9​
10function App() {
11 return (
12 <>
13 <h1>devtools e2e host</h1>
14 <input data-testid="text-input" placeholder="type here" />
15 <TanStackDevtools
16 config={{
17 theme: 'dark',
18 requireUrlFlag: new URLSearchParams(location.search).has('gated'),
19 }}
20 plugins={[
21 {
22 id: 'demo',
23 name: 'Demo',
24 defaultOpen: true,
25 render: <DemoPlugin />,
26 },
27 {
28 id: 'event-probe',
29 name: 'Event Probe',
30 render: <EventProbePanel />,
31 },
32 ]}
33 />
34 </>
35 )
37​
38createRoot(document.getElementById('root')!).render(<App />)