mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
104 stars 43 forks source link

Support new React Native new architecture #209

Open bhaskarathma opened 1 year ago

bhaskarathma commented 1 year ago

With Fabric/Turbomodules now being available for please add add support for it

See https://reactnative.dev/docs/new-architecture-library-intro

https://reactnative.dev/blog/2022/06/16/resources-migrating-your-react-native-library-to-the-new-architecture

ChaimMark commented 3 months ago

Any update?

AdamGerthel commented 2 months ago

I'm curious about this as well. Mixpanel and RN AppsFlyer are my current blockers for moving to the new arch.

Titozzz commented 1 month ago

Hey there! @zihejia 👋🏻 Would it be possible to get some update on that topic?

The new arch is here, and close to being enabled by default and if Mixpanel becomes a blocker to update it might push away users.

bfar97 commented 1 month ago

+1 on Mixpanel starting to be a major blocker for us, not allowing is to move to the new arch.

brentvatne commented 1 month ago

@zihejia @jaredmixpanel - hi there! I work on expo and closely with the react-native team at meta on assisting in the roll out of the new architecture for react-native. we're moving towards enabling the new architecture by default in react-native later this year, and so we're proactively reaching out for maintainers of popular libraries to get the ball rolling in some third party libraries (more info).

here's a guide with more info on how you can proceed: "Enable the New Architecture for Libraries"

if you need any assistance, let us know! just a heads up that i've heard that at least one customer is considering moving away from mixpanel due to this blocking their migration to the new architecture, so it may be worth addressing sooner than later.

Qdafengzi commented 1 month ago

open new architecture cannot open , please update

error page
evanbiskey commented 1 week ago

For those having trouble with this, we found a workaround using JS-only mode:

Follow instructions for Expo/Web set up: https://docs.mixpanel.com/docs/tracking-methods/sdks/react-native#expo-and-web-support

Then disable auto-linking the dependency with the react-native.config.js file:

module.exports = {
  dependencies: {
    'mixpanel-react-native': {
      platforms: {
        android: null,
        ios: null,
      },
    },
  },
};

This appears to keep the library running only on the JS layer without the need for the native side that is causing the app to crash. So far, this has given us the functionality that we need, but YMMV.

jaredmixpanel commented 1 week ago

Update here: The folks at Meta have just merged this React Native PR to add support for com.facebook.react.bridge.Dynamic to the New Architecture: https://github.com/facebook/react-native/pull/45944

Once that is released this issue should be resolved.

cortinico commented 1 week ago

We're planning to ship this hotfix to 0.75.x and 0.74.x

You can follow the status of those 2 picks here: