pendo-io / pendo-mobile-sdk

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value
https://www.pendo.io
Other
57 stars 2 forks source link

[React Native] - Add New Architecture support #168

Open duraz0rz opened 4 weeks ago

duraz0rz commented 4 weeks ago

Platform + Version iOS 16 (possibly Android, too)

SDK Version 3.3.2

Framework Expo 51, React Native 0.74 + New Architecture, React Navigation

Describe the bug The React Native Pendo SDK does not work when running a RN app with New Architecture enabled.

On app startup, I get a blank screen with the following messages in the console:

iOS Bundled 6775ms node_modules/expo/AppEntry.js (2160 modules)
 (NOBRIDGE) LOG  Bridgeless mode is enabled
 (NOBRIDGE) INFO  [rn-pendo-sdk]  React Navigation Init.
 (NOBRIDGE) INFO  [rn-pendo-sdk]  State must not be null.
 any analytics on this screen would be ignored
 please refer to new installation instruction

Upon restarting the app, I can see my home page, but I get the following output instead:

Debug: Opening JavaScript inspector in the browser...
✔ Dev tools (native only) › Reload app
› Press ? │ show all commands
iOS Bundled 224ms node_modules/expo/AppEntry.js (1 module)
 (NOBRIDGE) LOG  Bridgeless mode is enabled
 (NOBRIDGE) INFO  [rn-pendo-sdk]  React Navigation Init.
 (NOBRIDGE) WARN  [rn-pendo-sdk]  analyze (simple flow) screenId:HomeScreen. Original error: findScreenContainerRootTag - screenContainer tag not found.

The Pendo SDK does work under the legacy architecture, but the New Architecture will be on by default in the near future given it is currently in Beta and both Expo and React Native are doing a lot of work to get there.

Additional context https://github.com/reactwg/react-native-new-architecture#guides