CodeSolution

Please wait...

React-native updated version 0.60.0.

React-native updated version 0.60.0.

@version  @ react-native  @ androidX  @ webview  @ CocoaPods  @ Autolinking  

Announcing React Native 0.60

Highlights of changes:

  • AndroidX support (this will be a Breaking Change!)
  • Full removal of WebView & Geolocation, you now need to rely on the extracted versions
  • CocoaPods integration by default
  • Autolinking of packages

AndroidX Support

AndroidX is a major step forward in the Android ecosystem, and the old support library artifacts are being deprecated. For 0.60, React Native has been migrated over to AndroidX. This is a breaking change, and your native code and dependencies will need to be migrated as well.

CocoaPods by Default

CocoaPods are now part of React Native's iOS project. If you weren't already, be sure to open iOS platform code using the xcworkspace file from now on (protip: try xed ios from the root project directory). Also, the podspecs for the internal packages have changed to make them compatible with the Xcode projects, which will help with troubleshooting and debugging. Expect to make some straightforward changes to your Podfile as part of the upgrade to 0.60 to bring this exciting support. Note that we are aware of a compatability issue with use_frameworks!, and we're tracking an issue with workarounds and a future patch.

Lean Core Removals

WebView and NetInfo were previously extracted into separate repositories, and in 0.60 we’ve finished migrating them out of the React Native repository. Additionally, in response to community feedback about new App Store policy, Geolocation has been extracted. If you haven’t already, complete your migration by adding dependencies to react-native-webview@react-native-community/netinfo, and @react-native-community/geolocation. If you'd like an automated solution, consider using rn-upgrade-deprecated-modules. Maintainers have made more than 100 commits to these repositories since extraction and we’re excited to see the community’s support!

Native Modules are now Autolinked

The team working on the React Native CLI has introduced major improvements to native module linking called autolinking! Most scenarios will not require the use of react-native link anymore. At the same time, the team overhauled the linking process in general. Be sure to react-native unlink any preexisting dependencies as mentioned in the docs above.

 

React Native CLI Command Update

Creating a new React Native project

There are two ways to start a React Native project.

npx react-native init MyApp
react-native init AwesomeProject

Usage in an existing React Native project start Command

yarn react-native start
# or:
npx react-native start
# or
node ./node_modules/.bin/react-native start

In updated version react-native eject command not working you can use this command react-native upgrade --legacy true.

 

 

Comments 0

Reply