Welcome to release 0.59 of React Native! For highlights of this release, please view the dedicated blog post. Thanks to those who gave feedback during the release candidate phase. If you're interested in helping evaluate our next release (0.60), subscribe to the dedicated issue here.
Clarify error message to direct people to react-native start rather than react-native bundle (46aaa02 by @sunnylqm)
BREAKING - removed OkHttpClientProvider.replaceOkHttpClient method; please use OkHttpClientProvider.setOkHttpClientFactory from 0.54+ (7cbdd7b by @cdlewis)
BREAKING - remove ViewHelper, use ViewCompat instead; this may also require changing the android:theme to be from Theme.AppCompat; read more about it in the blog post (c493cfe by @dulmandakh)
Add nullable annotations to ReadableMap, WritableMap, ReadableArray, Writable, ReactPackage, and native module interfaces; this may impact Kotlin usage (b640b6f, c93cbdf, 7b33d6b, and e6d8ac8 by @dulmandakh)
Break changes to ScrollView, CameraRollView, and SwipeableRow that make it no longer bound to the component instance in certain methods
Support for mutual TLS in WebKit
Asset serving from directories besides /assets
Numerous crash fixes and resolutions for unexpected behavior
Thanks to those who gave feedback on our release candidates. If you're interested in helping evaluate our next release, check you our tracking issue here.
Add support for publicPath to enable serving static assets from different locations (0b31496 by @gdborton)
Bundler server host can now be set using Android System Properties, making for easier debugging across multiple apps or app installs adb shell setprop metro.host (e02a154 by @stepanhruda)
Public methods of components converted to ES6 classes are no longer bound to their component instance. For ScrollView, the affected methods are setNativeProps, getScrollResponder, getScrollableNode, getInnerViewNode, scrollTo, scrollToEnd, scrollWithoutAnimationTo, and flashScrollIndicators. For CameraRollView, the affected methods are: rendererChanged. For SwipeableRow, the affected methods are: close. Therefore, it is no longer safe to pass these method by reference as callbacks to functions. Auto-binding methods to component instances was a behaviour of createReactClass that we decided to not preserve when switching over to ES6 classes.
Welcome to the 0.57 release of React Native! This release addresses a number of issues and has some exciting improvements. We again skipped a monthly release, focused on quality by extending the release candidate phase, and let some upstream packages reach stable for inclusion.
This release includes 599 commits by 73 different contributors! In response to feedback, we've prepared a changelog that contains only user-impacting changes. Please share your input and let us know how we can make this even more useful, and as always let us know if you have any feedback on this process.
Accessibility APIs now support accessibility hints, inverted colors, and easier usage of defining the element's role and states; read more at @ziqichen6's excellent blog post
Better support for out-of-tree platforms. For details, please refer to the discussion that the community used to get this up and running (there will be a new page in the docs dedicated to it too) - huge props to @empyrical for working on this!
Android tooling has been updated to match newer configuration requirements (SDK 27, gradle 4.4, and support library 27); building with Android plugin 3.2 doesn't work due to the gradle scripts, so please stay on Android Studio 3.1 for now
Support Babel 7 stable landed! Be sure to read here about using TypeScript and check out the Babel 7 migration guide for help migrating.
Metro has been upgraded (with Babel 7 and better transformer support), and in the next major release we plan on having two new features (ram bundles and inline requires) optional for you all to use - you can read how it will happen here; moreover, if you have a custom packager config, we recommend you read also the "updating to this version" section.
As mentioned a few times in the past, the core team is reviewing the repository to trim it to the base React Native features in order to make the whole ecosystem more maintainable (by using a dividi-et-impera approach, the community will move faster and enable pull requests to be reviewed and merged quicker). This change requires extracting some components into their own separate repos and removing old, unused code (details here).
0.57 is not directly effected by any changes, but we want you to know that:
Ensure that you have all the babel dependencies to version ^7.0.0 (you may also need to add babel-core": "7.0.0-bridge.0" as a yarn resolution to ensure retro-compatibility)
If you have a custom packager configuration via rn-cli.config.js, you probably need to update it to work with the updated Metro configuration structure (for full detail refer to Metro's documentation); here are some commonly encountered changes to rn-cli.config.js:
As you'll see in a second, this new version has some important breaking changes that required a lot of extra efforts to bring to a stable 0.56. This was the main reason behind skipping June from the monthly release cycle, but looking forward we are planning on going back to do a rollout every month.
React Native now uses Babel 7.
When upgrading to 0.56, make sure to bump your react-native-babel-preset to v5 or newer.
If you have a library, please make sure that you update the preset there too as Babel 7 is not backwards compatible.
Node 8 is now the minimum required version. Trailing commas are now allowed.
iOS 9 is now the minimum required version.
Any device that can run iOS 8, can upgrade to iOS 9. Developers who support iOS 8 in their apps may continue doing so as this is a Xcode-level setting (IPHONEOS_DEPLOYMENT_TARGET).
WebView will only load http(s) URLs by default, geolocation disabled by default.
Added Flow types for several components.
We're migrating away from PropTypes and runtime checks and instead relying on Flow. You'll notice many improvements related to Flow in this release.
Heads-up: the Facebook internal team is currently working on a rewrite of some core architecture pieces. This is a work in progress and we do not expect it to be ready for use in open source quite yet, but we felt the need to let you know what those commits mentioning Fabric are about.
Don't get this wrong, react-native-web is alive and well. It is also the safest bet right now for achieving React Native on the Web.
At React Europe last week though, we were lucky to hear from Vincent Riemer talking about his experimental, comprehensive port of React Native to the web.
What Vincent focused on was to uniform the development process and the tools between Mobile and Web platforms. He ended up filling the gaps between the two with Yoga (cross-platform layout engine which implements Flexbox) and by compiling it to Web Assembly.
Multithreaded by default: Following the exact same architecture as React Native on mobile, all of your react components/app logic are run in web worker, leaving the main thread to entirely focus on rendering.
Same layout behavior as React Native on mobile: Powered by custom bindings to Yoga and compiled to Web Assembly, avoid layout inconsistencies between your native and web projects.
Built with the same bundler used for existing React Native platforms: Build both the "native" main and JS threads with the Metro Bundler along with all the developer experience features it provides.
Ecosystem compatible escape hatch to the DOM: Using the same native module bridge, expose DOM-specific APIs in a more generic way that can easily be made into a cross-platform module.
Bridging React Native Back to its Roots - Vincent Riemer (@vincentriemer) at @ReactEurope 2018
Bridging React Native Back to its Roots - Vincent Riemer (@vincentriemer) at @ReactEurope 2018 - YouTube