Skip to main content

State Inspection

Limelight’s state inspector lets you view, track, and debug your application state in real-time. Connect your Zustand or Redux stores with a single line of code and get full visibility into every state change.

Quick Start

Add your stores to the Limelight.connect() call:
That’s it. Open Limelight and you’ll see every state change as it happens.

Zustand

Limelight works with Zustand out of the box. Pass your store hooks directly:

Vanilla Stores

If you’re using Zustand’s vanilla stores (created with createStore instead of create), they work the same way:

Action Names

Limelight automatically infers action names from your code. When you call a function like login() that internally calls set(), Limelight captures “login” as the action name.
Action names are inferred from the call stack. If Limelight can’t determine the name, it falls back to “set”.

Redux

Connect your Redux store the same way:
Limelight automatically captures Redux action types and payloads:

Multiple Stores

You can connect as many stores as you need. Mix Zustand and Redux in the same app:
Use descriptive names for your stores. These names appear in the Limelight UI and help you quickly identify which store an action belongs to.

Configuration Options

Disable State Inspection

If you want to connect stores but temporarily disable state inspection:

Filter Sensitive Data

Use the beforeSend hook to filter or modify state before it’s sent to Limelight:

Throttle High-Frequency Updates

For stores that update very frequently (e.g., mouse position, animations), you may want to filter updates:

What Gets Captured

For each state change, Limelight captures:

Supported Libraries

Zustand

Full support for create() and createStore(). Action names inferred automatically.

Redux

Full support for Redux Toolkit and vanilla Redux. Captures action types and payloads.
Support for Jotai, Recoil, and MobX is coming soon. Let us know which libraries you’d like to see supported.

Best Practices

The names you pass to stores appear throughout the Limelight UI. Use names that clearly describe what the store contains:
Limelight infers action names from your function names. Use clear, descriptive names:
Stores that update many times per second can flood the timeline. Use beforeSend to throttle or filter these updates.
Never send passwords, tokens, or PII to Limelight. Use beforeSend to redact sensitive fields before they leave the device.

Troubleshooting

  1. Make sure Limelight.connect() is called after your store is created
  2. Verify the store is passed correctly to the stores object
  3. Check that enableStateInspector is not set to false
  4. Look for errors in the console starting with [Limelight]
Limelight infers action names from the call stack. If your bundler minifies function names in development, the names may not be captured correctly. Solutions: - Ensure your development build doesn’t minify function names - Use named functions instead of arrow functions for actions
  1. Verify the WebSocket connection is established (check for “Connected” status) 2. Make sure you’re not filtering out the events with beforeSend 3. Check that the state is actually changing (Limelight only captures changes)
Limelight is designed to have minimal performance impact:
  • State is captured synchronously but sent asynchronously
  • Diffs are computed on the desktop app, not in your app
  • The SDK automatically disables itself in production builds
If you notice performance issues with high-frequency stores, use beforeSend to throttle updates.

Next Steps

Network Inspection

Debug API requests alongside state changes

Console Logs

View console output with full stack traces
``` ````