Skip to content

chore: migrate to React Native 0.83#213

Open
kherembourg wants to merge 2 commits intomainfrom
feature/rn-0.83-migration
Open

chore: migrate to React Native 0.83#213
kherembourg wants to merge 2 commits intomainfrom
feature/rn-0.83-migration

Conversation

@kherembourg
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @kherembourg, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant migration to React Native 0.83.1, involving extensive updates to development environment configurations, build settings for both Android and iOS platforms, and dependency versions. It also introduces a new best practices document to standardize future upgrade processes and includes a critical fix for an Android memory leak.

Highlights

  • React Native Upgrade: The project has been migrated to React Native version 0.83.1, updating core dependencies and configurations across the codebase.
  • Node.js Version Update: The required Node.js version has been updated to v20.19.4 in .nvmrc and package.json files.
  • Android Build Environment Updates: Android build configurations have been updated to use Kotlin 2.1+, Java 17, and Gradle 8.14, ensuring compatibility with the new React Native version.
  • iOS Project Configuration: iOS project settings (project.pbxproj and Info.plist) were modified to correctly configure the Node.js binary path and enable the New Architecture.
  • New Upgrade Best Practices Guide: A comprehensive guide (docs/react-native-upgrade-best-practices.md) has been added to document best practices for future React Native version upgrades.
  • Android Memory Leak Fix: A potential memory leak in PurchaselyViewManager.kt related to Choreographer.FrameCallback has been addressed by implementing frame callback tracking and proper cleanup.
  • Native Module Command ID Update: The PLYPresentationView.tsx component now uses numeric command IDs for Android native module calls, ensuring compatibility with React Native's New Architecture.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request migrates the React Native SDK from version 0.79.2 to 0.83.1. The upgrade includes comprehensive updates across JavaScript dependencies, native Android and iOS code, build tooling, and introduces a detailed upgrade guide for future migrations. Key improvements include fixing a memory leak in the Android ViewManager and preparing the codebase for React Native's New Architecture compatibility.

Changes:

  • Updated React Native from 0.79.2 to 0.83.1 with all associated dependencies
  • Fixed Android memory leak by limiting layout frame callbacks
  • Improved TypeScript type safety in PLYPresentationView component
  • Added comprehensive React Native upgrade documentation for future reference

Reviewed changes

Copilot reviewed 21 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
yarn.lock Updated React Native and all related dependencies to 0.83.1 versions
test-projects/rn-purchasely-test/package.json Updated RN and tooling dependencies, bumped Node requirement to >=20
packages/purchasely/src/components/PLYPresentationView.tsx Improved type safety, fixed command ID for New Architecture compatibility
packages/purchasely/src/__tests__/PLYPresentationView.test.tsx Updated test to expect numeric command ID instead of string
packages/purchasely/package.json Updated React Native devDependency to 0.83.1
packages/purchasely/android/.../PurchaselyViewManager.kt Fixed memory leak by limiting frame callbacks and proper cleanup
packages/{huawei,google,android-player,amazon}/package.json Updated React Native devDependencies across all platform packages
package.json Added Node.js engine constraint >=20.19.4 <21
example/src/Paywall.tsx Removed deprecated Header import
example/src/Home.tsx Defined Colors locally (removed from RN internals)
example/package.json Updated RN, tooling, and screens dependency
example/ios/example/Info.plist Enabled New Architecture flag, removed comment
example/ios/example.xcodeproj/project.pbxproj Added New Architecture build settings
example/ios/Podfile.lock Updated all iOS dependencies for RN 0.83.1
example/android/gradle/wrapper/gradle-wrapper.properties Updated Gradle from 8.12 to 8.14
example/android/build.gradle Updated Kotlin from 2.0.21 to 2.1.20
docs/react-native-upgrade-best-practices.md Added comprehensive 574-line upgrade guide
CLAUDE.md Updated version references and technical requirements
AGENTS.md Cleaned up outdated CI troubleshooting notes
.nvmrc Pinned Node version to v20.19.4

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully migrates the project to React Native 0.83.1, updating dependencies and configurations across the monorepo. It notably includes a critical fix for a potential memory leak in the Android PurchaselyViewManager and refactors the PLYPresentationView for better New Architecture compatibility. The addition of a comprehensive guide for future React Native upgrades is a valuable asset. My review includes a couple of suggestions to improve the accuracy of this new documentation and to restore a helpful warning comment in the example app's Info.plist.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@kherembourg
Copy link
Contributor Author

@codex review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments