From a5d09784390fce4a9f68f72841feb22c81c6d349 Mon Sep 17 00:00:00 2001 From: Cole Lawrence Date: Fri, 19 Sep 2025 22:50:23 -0300 Subject: [PATCH] docs: Fix count increment and decrement in custom plugins guide --- docs/framework/react/guides/custom-plugins.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/framework/react/guides/custom-plugins.md b/docs/framework/react/guides/custom-plugins.md index b5dd18ac..5b0a01d4 100644 --- a/docs/framework/react/guides/custom-plugins.md +++ b/docs/framework/react/guides/custom-plugins.md @@ -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, }) }, @@ -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