Client State Viewer
Inspect Next Experience client-side state in real-time using the Sidekick debugging tool.
The Client State Viewer lets you inspect the client-side state of Next Experience (Polaris) pages. See what data is flowing through the UI framework, how components are connected, and what values are currently set — all in real-time from the Sidekick window.
<!-- Screenshot needed: Client State Viewer with expanded state tree -->
Opening the Client State Viewer
Use the slash command /skclientstate or open Sidekick and select the Client State tab.
What You Can See
The Client State Viewer displays the current client-side state as a navigable tree. This includes:
- Page-level state — Values set at the page level in UI Builder
- Component properties — Props passed to individual components
- Data bindings — Live data flowing from server to client
- Client-side variables — State managed by the browser
Each node in the tree shows its current value and updates in real-time as you interact with the ServiceNow page.
Navigating the State Tree
- Expand/collapse — Click on any node to expand or collapse its children
- Search — Use the search field to find specific state keys or values
- Copy — Click the copy icon on any node to copy its path or value
Use Cases
Debugging a UI Builder Component
When building custom components for Next Experience, use the Client State Viewer to verify that:
- Your component receives the expected properties
- Data bindings resolve to the correct values
- State changes propagate as expected when users interact with the page
Understanding Page Behavior
When a Next Experience page doesn't behave as expected:
- Open the Client State Viewer
- Navigate to the relevant component state
- Compare actual values against expected values
- Identify where the data flow breaks down
Inspecting Data Resources
Data resources (REST, GraphQL, Script) populate client state with their results. Use the Client State Viewer to:
- Verify that data resources have loaded
- Check the response data structure
- Identify loading or error states
Tips
- Live updates — The state tree updates in real-time. Change a field value on the page and watch it reflect instantly.
- Deep paths — Use dot notation in search (e.g.,
state.data.result) to jump to deeply nested values. - Compare before/after — Open the viewer, note the current state, perform an action, and see what changed.
Related
- Sidekick Overview — All five debugging tools
- UIB Page State — Edit UI Builder page state values