[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/realtime/realtimekit/ui-kit/state-management/ [Back]  [Original]

State Management Cloudflare Realtime docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /Realtime
  3. /
  4. /Build using UI Kit
  5. /State Management

State Management

Last updated Apr 21, 2026Copy as MarkdownView as MarkdownAgent setup
OverviewPrerequisitesHow UI Kit Components CommunicateState FlowListening to State UpdatesExample CodeState PropertiesBest Practices

Prerequisites

This page builds upon the Basic Implementation Guide. Make sure you've read those first.

The code examples on this page assume you've already imported the necessary packages and initialized the SDK.

WebMobile
ReactWeb ComponentsAngular

How UI Kit Components Communicate

Here's an example of how state synchronization works when opening the participants sidebar:

flowchart LR
    accTitle: Sidebar State Synchronization Example
    accDescr: Example showing how clicking participants toggle updates sidebar through meeting coordination

    Toggle[" ParticipantsToggle<br/>(User clicks)"]
    Meeting["Meeting Component<br/>(State Coordinator)"]
    Sidebar["Sidebar<br/>(Opens/Closes)"]
    App["Your App<br/>(Gets notified)"]

    Toggle -->|"emits rtkStateUpdate<br/>{activeSidebar: true,<br/>sidebar: 'participants'}"|Meeting
    Meeting -->|"propagates state"|Sidebar
    Meeting -->|"emits rtkStatesUpdate"|App

    style Meeting fill:#F48120,stroke:#333,stroke-width:2px,color:#fff
    style App fill:#0051C3,stroke:#333,stroke-width:2px,color:#fff

State Flow

Listening to State Updates

To build custom UI or perform actions based on meeting state changes, you need to observe state updates from the UI Kit.

Example Code

State Properties

Best Practices

PreviousGetting StartedNextComponent Library

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page