Skip to content

Conversation

@pfeiffer
Copy link
Contributor

@pfeiffer pfeiffer commented Nov 14, 2025

This PR updates the library to require React Native 0.76+ and configures it for New Architecture compatibility via the interop layer.

Breaking Changes

  • Minimum React Native version: >=0.76.0 (Expo SDK 52+)
  • New Architecture must be enabled (RCT_NEW_ARCH_ENABLED=1)

Build Configuration

  • iOS: Removed conditional New Architecture checks, always enabled
  • Android: Removed conditional checks, always apply React plugin with Codegen config

JavaScript Layer

  • Use TurboModuleRegistry instead of NativeModules for session manager
  • Use Codegen-generated Commands for cleaner command dispatch
  • Removed platform-specific command handling logic

Message passing

  • Changed message passing from JavaScript (WebView) -> native to always serialize to JSON for consistency between the platforms and to be able to generate codegen properly (ie. message is now always a string). We parse the JSON on the React Native side.

Android Native Code

  • Fixed: Changed events from bubbling to direct (consistency with iOS)
  • String-based command routing instead of ordinal-based
  • Minor cleanup: removed unnecessary empty array check in getSessionHandles
  • Removed unused import in RNWebChromeClient

Architecture Note

Native implementations remain on Paper architecture. The library runs via React Native's interop layer when New Architecture is enabled.

This PR adds support for New Arch via interop layer and drops support
for legacy arch, and streamline event handling between platforms.
@sethhorsley
Copy link

This is awesome!!!

Change message passing to use JSON string serialization for consistency
across iOS and Android platforms. Messages are now stringified on the
JavaScript side, passed as strings through the native bridge, and parsed
back to objects in useMessageQueue. Needed for codegen.
@pfeiffer pfeiffer marked this pull request as ready for review November 18, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants