Skip to content

[COMPATIBILITY] 🐛 Performance Monitor Plugin Incompatible with New Architecture React Native / Turborepo #124

@mcayuelas-ledger

Description

@mcayuelas-ledger

🧠 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:

  1. 🧩 Uses the legacy native module system (not compatible with TurboModules)
  2. 🔗 Relies on Bridge APIs (not adapted for the Fabric renderer)
  3. ⚙️ 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-performance uses the old Bridge system
  • PerformanceObserver APIs 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions