Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit 5fd2985

Browse files
docs(readme): updated readme for state management and sample link
1 parent c050006 commit 5fd2985

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Here are the list of available samples at the moment.
99
1. [Default Meeting UI](./samples/default-meeting-ui/)
1010
2. [Using Background Transformer to modify your background](./samples/with-background-transformer/)
1111
3. [Background Transformer UI sample](./samples/background-transformer-ui/)
12+
4. [Create Your Own UI](./samples/create-your-own-ui/)
1213

1314
## Usage
1415

samples/create-your-own-ui/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This sample demonstrates how to create a custom meeting UI using Cloudflare Real
1010
- **Custom Sidebar**: Standard tabs (chat, participants, polls, plugins) plus custom "warnings" tab
1111
- **Custom Meeting Header**: Logo, indicators, meeting title, and controls
1212
- **Responsive Design**: Built with Tailwind CSS for modern UI
13-
- **State Management**: Uses Valtio for reactive state management
13+
- **State Management**: Uses simple reactive state implementation
1414
- **No Build Steps**: Pure HTML/CSS/JS implementation
1515

1616
## Getting Started
@@ -48,7 +48,7 @@ This sample demonstrates how to create a custom meeting UI using Cloudflare Real
4848
```
4949
create-your-own-ui/
5050
├── index.html # Main HTML file
51-
├── store.js # Valtio state management
51+
├── store.js # Simple reactive state management
5252
├── utils.js # Utility functions
5353
├── types.js # Type definitions
5454
├── components/ # Component files
@@ -113,7 +113,7 @@ create-your-own-ui/
113113

114114
- **Cloudflare RealtimeKit**: Core meeting functionality
115115
- **Cloudflare RealtimeKit UI**: Pre-built UI components
116-
- **Valtio**: Reactive state management
116+
- **Simple Reactive State**: Custom reactive state implementation
117117
- **Tailwind CSS**: Utility-first CSS framework
118118

119119
All dependencies are loaded via CDN, no build process required.
@@ -132,13 +132,19 @@ This sample works in modern browsers that support:
132132

133133
1. **Auth Token Error**: Ensure you're passing a valid `authToken` in the URL
134134
2. **Components Not Loading**: Check browser console for script loading errors
135-
3. **State Not Updating**: Verify Valtio subscriptions are properly set up
135+
3. **State Not Updating**: Verify reactive state subscriptions are properly set up
136136
4. **Media Devices**: Ensure browser permissions for camera/microphone access
137137

138138
### Debug Mode
139139

140140
The meeting object is exposed on `window.meeting` for debugging purposes. Open browser dev tools and inspect the meeting object to troubleshoot issues.
141141

142+
### State Subscription Issues
143+
144+
If components aren't updating when states change, ensure you're subscribing to the store object, not the nested states:
145+
-`window.StatesStore.subscribe(statesStore, callback)`
146+
-`window.StatesStore.subscribe(statesStore.states, callback)`
147+
142148
## License
143149

144150
This sample is provided as-is for demonstration purposes.

0 commit comments

Comments
 (0)