Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/framework/react/guides/custom-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,20 @@ export function createCounter() {
getCount: () => count,
increment: () => {
history.push(count)
count++

// The emit eventSuffix must match that of the EventMap defined in eventClient.ts
DevtoolsEventClient.emit('counter-state', {
count: count++,
count: count,
history: history,
})
},
decrement: () => {
history.push(count)
count--

DevtoolsEventClient.emit('counter-state', {
count: count--,
count: count,
history: history,
})
},
Expand Down Expand Up @@ -160,7 +162,7 @@ createRoot(document.getElementById('root')!).render(

## Debugging

Both the TansTack `TanStackDevtools` component and the TanStack `EventClient` come with built in debug mode which will log to the console the emitted event as well as the EventClient status.
Both the `TanStackDevtools` component and the TanStack `EventClient` come with built in debug mode which will log to the console the emitted event as well as the EventClient status.

TanStackDevtool's debugging mode can be activated like so:
```tsx
Expand Down