-
Notifications
You must be signed in to change notification settings - Fork 20
Description
🧠 Problem Description
The @rozenite/performance-monitor-plugin is not compatible with New Architecture React Native and Turborepo, while other Rozenite plugins work correctly in these environments.
🔍 Root Cause
The Performance Monitor plugin depends on the react-native-performance library, which:
- 🧩 Uses the legacy native module system (not compatible with TurboModules)
- 🔗 Relies on Bridge APIs (not adapted for the Fabric renderer)
- ⚙️ Includes native dependencies that are not updated for New Architecture
🧪 Technical Details
Current Implementation:
// packages/performance-monitor-plugin/src/react-native/performance-monitor.ts
import performance, {
EntryType,
PerformanceEntry,
PerformanceObserver,
} from 'react-native-performance';Issues Identified:
react-native-performanceuses the old Bridge systemPerformanceObserverAPIs are not compatible with TurboModules- Native module linking fails in Turborepo monorepo setups
⚖️ Comparison with Working Plugins
| Plugin | Compatibility | Implementation Type |
|---|---|---|
✅ @rozenite/network-activity-plugin |
Works | Pure JavaScript interceptors |
✅ @rozenite/mmkv-plugin |
Works | New Architecture compatible MMKV |
✅ @rozenite/react-navigation-plugin |
Works | Pure React APIs |
✅ @rozenite/redux-devtools-plugin |
Works | JS-only implementation |
❌ @rozenite/performance-monitor-plugin |
Fails | Depends on react-native-performance |
✅ Expected Behavior
All Rozenite plugins should work consistently across:
- ✅ Old Architecture React Native
- ✅ New Architecture React Native
- ✅ Turborepo monorepos
- ✅ Metro bundler
- ✅ Re.Pack bundler
❌ Current Behavior
Performance Monitor plugin fails to initialize or function properly in:
- ❌ New Architecture React Native projects
- ❌ Turborepo monorepo setups
- ❌ Projects with
newArchEnabled=true
🌍 Environment
| Key | Value |
|---|---|
| Rozenite Version | 1.0.0-alpha.15 |
| React Native Version | 0.77+ |
| New Architecture | Enabled (newArchEnabled=true) |
| Turborepo | Latest |
| Platforms | Android / iOS |
📎 Additional Context
This issue affects users migrating to React Native New Architecture, which becomes default starting from React Native 0.76+.
The Performance Monitor plugin is currently the only Rozenite plugin with a compatibility issue.
System Info
## 🌍 Environment
| Key | Value |
| ------------------------ | ------------------------------- |
| **Rozenite Version** | 1.0.0-alpha.15 |
| **React Native Version** | 0.77+ |
| **New Architecture** | Enabled (`newArchEnabled=true`) |
| **Turborepo** | Latest |
| **Platforms** | Android / iOS |Rozenite Version
1.0.0-alpha.15
Reproduction
Every project using newArch ?
Steps to reproduce
Try to use Performance Monitor pluggin in a React Native new Arch project using turborepo