[SDK-475] update-rn-version-to-0-80#861
Conversation
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
There was a problem hiding this comment.
Pull request overview
Updates this repo’s React Native toolchain and example apps to React Native 0.80.3 (and React 19.1.0), including associated CLI/Metro/Babel config bumps and platform build updates needed to keep tests and the sample apps working.
Changes:
- Bump React Native/React and related React Native tooling packages (CLI, Babel preset, Metro config, TS config), plus align
react-native-screensand test renderer/types. - Update Jest setup to provide a concrete
NativeEventEmittermock compatible with the newer RN internals. - Refresh example Android/iOS build configuration for the newer RN template defaults (Gradle wrapper, Kotlin version, Android entrypoint loading, iOS new-arch flag).
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Lockfile updates reflecting RN 0.80.3 / React 19.1.0 dependency graph changes. |
src/__mocks__/jest.setup.ts |
Reworks NativeEventEmitter mocking to support event-driven tests under updated RN internals. |
package.json |
Bumps devDependencies for RN 0.80.3 + React 19.1.0 and aligns related types/screens/test renderer. |
example/package.json |
Updates example app dependencies/devDependencies to match RN 0.80.3 + toolchain versions. |
example/ios/ReactNativeSdkExample/Info.plist |
Enables new architecture flag (RCTNewArchEnabled) and minor plist key ordering cleanup. |
example/ios/ReactNativeSdkExample.xcodeproj/project.pbxproj |
Regenerates CocoaPods/Xcode project references consistent with updated iOS setup. |
example/android/gradlew.bat |
Adds upstream header comments from the RN template. |
example/android/gradle/wrapper/gradle-wrapper.properties |
Updates Gradle wrapper distribution to 8.14.1. |
example/android/gradle.properties |
Adds edgeToEdgeEnabled property and normalizes formatting. |
example/android/build.gradle |
Updates Kotlin version used by the example Android buildscript. |
example/android/app/src/main/java/iterable/reactnativesdk/example/MainApplication.kt |
Switches initialization to loadReactNative(this) per newer RN entrypoint pattern. |
android/gradle.properties |
Bumps library Kotlin version property to align with updated build tooling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const mockNativeEventEmitter = | ||
| new (require('events').EventEmitter)() as import('events').EventEmitter; | ||
|
|
||
| const mockNativeEventEmitterConstructor = jest.fn().mockImplementation(() => ({ |
There was a problem hiding this comment.
The new mock replaces the per-instance auto-mock with a single module-scoped EventEmitter that all new NativeEventEmitter(...) instances share. That changes semantics: tests that subscribe to one "emitter" and emit on another will now incorrectly cross-talk, and listeners persist across tests since there's no reset.
Two questions:
- Why not
mockImplementation(() => new (require('events').EventEmitter)())so each instance is isolated, like real RN behavior? - If shared state is intentional, could we add a
beforeEach(() => mockNativeEventEmitter.removeAllListeners())to prevent leakage between tests?
There was a problem hiding this comment.
LGTM for the 0.80.3 bump — local verification passed (install, typecheck, lint, tests, build, clean pod install + iOS example build under New Architecture). Android trusted to CI (no Java locally).
A few non-blocking items worth addressing before merge:
1. iOS Pods cache key in CI is effectively broken (P2)
.github/workflows/ci.yml keys the Pods cache on hashFiles('example/ios/Podfile.lock'), but Podfile.lock is gitignored, so that key is constant/empty across upgrades. On a cache hit, pod install is skipped — meaning a stale 0.79 Pods dir could survive into 0.80 CI runs. Reproduced locally: stale fast_float 6.1.4 (0.79) vs RN 0.80.3's required 8.0.0. After wiping Pods, clean pod install worked.
Suggested fixes (pick one):
- Key the cache on tracked inputs:
yarn.lock,package.json,example/ios/Podfile. - Always run
pod installafter restoring the cache (don't skip on hit). - Long-term: commit
example/ios/Podfile.lockso the cache key actually reflects pod state.
2. README Legacy Architecture wording is ambiguous (P3)
The new line in README.md says the SDK supports Legacy Arch but it "is no longer actively maintained. Use at your own risk." That can be read two ways — as RN's own 0.80 freeze, or as Iterable changing its support policy. Since the SDK still ships the legacy native path and peerDependencies.react-native: "*", it'd be clearer to attribute the freeze to RN explicitly, e.g.:
"Starting in React Native 0.80, RN's Legacy Architecture is frozen. This SDK still supports it for compatibility, but active development and testing is focused on the New Architecture."
If we're actually changing Iterable's support policy for legacy consumers, that belongs in release notes / version-support docs, not just a README warning.
3. AGP pin (worth verifying in Android CI)
android/build.gradle:12 and example/android/build.gradle:15 still pin AGP 8.7.2, while RN 0.80's gradle plugin declares AGP 8.9.2 internally. Worth aligning with the RN 0.80 template if CI doesn't resolve it.

🔹 JIRA Ticket(s) if any
✏️ Description