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

eventClient.ts

17 lines437 Bytes

1import { EventClient } from '@tanstack/devtools-event-client'
2​
3type EventMap = {
4 'counter-state': { count: number; history: Array<number> }
5}
6​
7class CustomEventClient extends EventClient<EventMap> {
8 constructor() {
9 super({
10 pluginId: 'custom-devtools',
11 debug: true,
12 })
13 }
15​
16// This is where the magic happens, it'll be used throughout your application.
17export const DevtoolsEventClient = new CustomEventClient()