skip to Main Content

Are there any tools or solutions available to help with this task?

I have an old React Native project in version 0.59.10, and I want to convert it to the latest version. I have tried several methods, but my source code is not compatible with the latest version of React Native.

MY MAIN QUESTION IS

how can I make my code compatible with the latest version of React Native?
Should I fix it manually, or are there any tools or solutions available?

2

Answers


  1. Never worked with apps that have older version of react native than 60, but I can give you my piece of advice. Initialize new react native project with newest react-native version. Copy packages from your old app and update them as needed. Then do the same with src folder. After that add rest of files that are in old project (if you have those), like eslintrc, babel.config etc.
    If that all succeeds, you can start adding native parts of the app to the new one, including icons, app name, splash screen, permissions and everything else that you need. If the old app is on github, dont forget to add .git folder from the old project as well. That is how I manage updating apps

    Edit: Tools like react-native upgrade helper wont save you from this situation. I find it useful only when updating apps from 70+ to later versions.

    Login or Signup to reply.
  2. To make your React Native code compatible with the latest version, you have a few options:

    Manual code migration: This involves manually updating your codebase by identifying and modifying the deprecated or incompatible code. It requires a thorough understanding of the changes and updates made in each version of React Native. While this approach provides full control, it can be time-consuming and error-prone, especially if you have a large codebase.

    Third-party tools and libraries: There are tools and libraries available that can assist with code migration. These tools automate certain aspects of the migration process and provide automated refactoring, code analysis, and fix suggestions. However, keep in mind that these tools may not cover all migration scenarios and might require some manual adjustments.
    Use the below Third-party tool. I think it will help you a lot
    React Native Upgrade Helper (https://react-native-community.github.io/upgrade-helper/): This web-based tool helps automate the process of upgrading React Native projects.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search