Theme Sync
triggerThemeModeEvent(theme: string)
Toggles the native app's theme.
Parameters
theme: Must be literally"dark"or"light".
Example
javascript
const toggleTheme = () => {
const newTheme = isDark ? 'light' : 'dark';
setTheme(newTheme);
triggerThemeModeEvent(newTheme);
}Next Steps
- Explore Cart count sync
- Understand Turbo Native detection
- Learn about Server vs Client Usage
