Expo UI Worklets: Bridging the Native Gap Without the Bridge

Expo announced Worklets for Expo UI, a new mechanism that lets React Native developers synchronously control SwiftUI and Jetpack Compose state from JavaScript. The core problem: React Native's bridge architecture introduces latency and re-render overhead when interacting with native UI frameworks. Worklets bypass this entirely.

The Problem: Bridge Friction

React Native traditionally communicates between JavaScript and native code via an asynchronous bridge. For UI state changes—like updating a SwiftUI slider or a Compose text field—this means a round-trip through the bridge, causing perceptible delays and unnecessary re-renders. Developers often resort to hacks like useNativeDriver or third-party libraries to mitigate this.

How Worklets Work

Worklets are JavaScript functions that run synchronously on the native UI thread. They can read and update native state directly, without serialization or crossing the bridge. Expo UI provides a useWorklet hook that wraps a JavaScript function into a Worklet. The function can call native methods exposed via Expo UI's modules.

Example: Updating a SwiftUI slider value from a Worklet:

import { useWorklet, ExpoUI } from 'expo-ui';

function SliderComponent() {
  const updateSlider = useWorklet((newValue) => {
    ExpoUI.SwiftUI.sliderValue = newValue;
  });

  return  updateSlider(0.8)} title="Set to 80%" />;
}

This code sets the slider to 80% instantly, without a bridge round-trip. The Worklet runs on the UI thread, so the change is visible on the next frame.

Performance Gains

According to Expo's blog post, Worklets reduce the latency of state updates from ~16ms (one bridge round-trip at 60fps) to under 1ms. This is critical for animations, gestures, and real-time UI updates. Expo UI also integrates with react-native-reanimated for smooth animations driven by Worklets.

Support for SwiftUI and Compose

Worklets work with both SwiftUI (iOS) and Jetpack Compose (Android). Expo UI exposes a set of native components that accept Worklet callbacks. For example, a SwiftUI Slider component can have its onEditingChanged callback as a Worklet, enabling instant response to user interaction.

Developer Experience

Worklets are written in plain JavaScript/TypeScript. No native code required. Expo UI's useWorklet hook ensures the function is compiled to a Worklet at build time. The Expo team claims that existing React Native code can be incrementally migrated—start with one component, then expand.

Availability

Expo UI with Worklet support is available in Expo SDK 52 (released January 2025). It requires iOS 16+ and Android 13+ due to SwiftUI and Compose runtime requirements. The feature is marked as experimental; the team expects API refinements based on community feedback.

Under the Hood: JSI and JNI

Worklets leverage React Native's JSI (JavaScript Interface) on iOS and JNI (Java Native Interface) on Android. Instead of serializing state changes to JSON and sending them over the bridge, JSI/JNI allow direct memory access to native objects. This is the same technique used by react-native-reanimated v3, but Expo UI extends it to arbitrary SwiftUI and Compose state.

Comparison with Alternatives

  • Native Modules: Require writing Swift/Kotlin code and managing threads. Worklets are JavaScript-only.
  • Reanimated: Focused on animations. Expo UI Worklets handle any UI state change.
  • Legacy Bridge: Asynchronous, slower, causes re-renders. Worklets are synchronous, fast, and avoid re-renders.

Real-World Use Cases

  • Form inputs: Update text fields on every keystroke without lag.
  • Drag-and-drop: Track gesture position at 120fps.
  • Real-time charts: Update data points as fast as the data arrives.
  • Native navigation: Sync tab bar state instantly.

Migration Path

Expo provides a migration guide from existing React Native patterns. The key change: replace useState with useWorklet for UI state that needs to be reflected in native components. Non-UI state (business logic) remains in React state.

Limitations

  • Worklets cannot access the DOM or React component tree.
  • They have limited access to JavaScript APIs (no fetch, no setTimeout).
  • Debugging is harder because Worklets run on a separate thread. Expo is working on DevTools integration.

What's Next

Expo plans to add Worklet support for more native frameworks (e.g., UIKit, Android Views). They are also exploring Worklet-based gesture handlers and animation drivers. The SDK 53 release (expected Q2 2025) will likely include these enhancements.

Conclusion

Expo UI Worklets solve a fundamental performance bottleneck in React Native. If you build apps with complex native UI interactions, start experimenting with Worklets in SDK 52 now. The API is stable enough for production use cases, but expect breaking changes as it matures. Read the full announcement on the Expo blog.