What? My debouncer can have dedicated devtools? Yep!
TanStack Pacer provides devtools for debugging and monitoring all your utilities in real-time. The devtools integrate seamlessly within the new TanStack Devtools multi-panel UI.
Note
By default, the TanStack Devtools and TanStack Pacer Devtools will only be included in development mode. This helps keep your production bundle size minimal. If you need to include devtools in production builds (e.g., for debugging production issues), you can use the alternative "production" imports.
Install the devtools packages for your framework:
npm install @tanstack/react-devtools @tanstack/react-pacer-devtools
npm install @tanstack/react-devtools @tanstack/react-pacer-devtools
npm install @tanstack/solid-devtools @tanstack/solid-pacer-devtools
npm install @tanstack/solid-devtools @tanstack/solid-pacer-devtools
import { TanStackDevtools } from '@tanstack/react-devtools'
import { PacerDevtoolsPanel } from '@tanstack/react-pacer-devtools'
function App() {
return (
<div>
{/* Your app content */}
<TanStackDevtools
eventBusConfig={{
debug: false,
}}
plugins={[{ name: 'TanStack Pacer', render: <PacerDevtoolsPanel /> }]}
/>
</div>
)
}
import { TanStackDevtools } from '@tanstack/react-devtools'
import { PacerDevtoolsPanel } from '@tanstack/react-pacer-devtools'
function App() {
return (
<div>
{/* Your app content */}
<TanStackDevtools
eventBusConfig={{
debug: false,
}}
plugins={[{ name: 'TanStack Pacer', render: <PacerDevtoolsPanel /> }]}
/>
</div>
)
}
import { TanStackDevtools } from '@tanstack/solid-devtools'
import { PacerDevtoolsPanel } from '@tanstack/solid-pacer-devtools'
function App() {
return (
<div>
{/* Your app content */}
<TanStackDevtools
eventBusConfig={{
debug: false,
}}
plugins={[{ name: 'TanStack Pacer', render: <PacerDevtoolsPanel /> }]}
/>
</div>
)
}
import { TanStackDevtools } from '@tanstack/solid-devtools'
import { PacerDevtoolsPanel } from '@tanstack/solid-pacer-devtools'
function App() {
return (
<div>
{/* Your app content */}
<TanStackDevtools
eventBusConfig={{
debug: false,
}}
plugins={[{ name: 'TanStack Pacer', render: <PacerDevtoolsPanel /> }]}
/>
</div>
)
}
By default, devtools are excluded from production builds to minimize bundle size. The default imports will return no-op implementations in production:
// This will be a no-op in production builds
import { PacerDevtoolsPanel } from '@tanstack/react-pacer-devtools'
// This will be a no-op in production builds
import { PacerDevtoolsPanel } from '@tanstack/react-pacer-devtools'
If you need to include devtools in production builds (e.g., for debugging production issues), use the production-specific imports:
// This will include full devtools even in production builds
import { PacerDevtoolsPanel } from '@tanstack/react-pacer-devtools/production'
// This will include full devtools even in production builds
import { PacerDevtoolsPanel } from '@tanstack/react-pacer-devtools/production'
Each utility should automatically be detected and displayed in the devtools. However, if you don't provide a key option to the utility, it will show with a uuid for its name. Give it an identifiable name with the key option.
const debouncer = new Debouncer(myDebounceFn, {
key: 'My Debouncer', // friendly name for the utility instead of auto-generated uuid
wait: 1000,
})
const debouncer = new Debouncer(myDebounceFn, {
key: 'My Debouncer', // friendly name for the utility instead of auto-generated uuid
wait: 1000,
})
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.