react-native project upgrade

24 March 2023
To 0.70.6
react-native

I upgraded react-native for an app I'm working on to 0.70.6.

New architecture was being introduced however I am turning that off for now until I figured out the benefits of it.

With that said, it is still exciting to build mobile apps with React Native, and even so with the new architecture.

Most of the issues that I am facing when upgrading the app were able to be fixed with just simply upgrading the corresponding packages/dependencies to the latest version.

While some other have alternatives like using temporary packages to fix the error. For example, using deprecated-react-native-prop-types to replace legacy code ViewPropTypes and Text.PropTypes in the project.


For android, a lot of issues thrown out when building the app (as usual), but are able to be solved after spending some time. For example, in the following error, use allowInsecureProtocol = true for one of the repository (though it will be better to inspect the usage of this package in the near future, and revisit this workaround).

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportBetaRelease'.
> Could not resolve all dependencies for configuration ':app:betaReleaseRuntimeClasspath'.
   > Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven6(http://dl.bintray.com/lukaville/maven)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.5.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.


Solutions for other issues are not available, therefore I change the code in the packages and use patch-package for that. Not that I am satisfied with it, but it is the way to go for now.

That's all. Cheers.