- This article is Marno original, reprint must retain source!
- Public account [Marno], follow RN to join the exchange group, waiting for you!
- React Nativewww.marno.cn
takeaway
I haven’t translated the update log for a long time, mainly I really can’t spare so much time. Translating the update log can be very time consuming. In the past, when I was translating, I would basically read all the updates, not just the ones in the list, but every commit detail. Sometimes, if there are too many updates, and I only have time in the evening after work, it can take almost a week to translate an update.
I took it seriously because I thought it was a good thing to do, and it’s important for people who follow and use RN, but when I started doing it, IT was mainly because I needed it too. Anyway, I read it, and I translated it, and maybe some people would read it. And for reasons we all know, the feeling of rushing to upgrade without carefully researching what’s new… Really tired heart!
To highlight
- Enhance the use of Flow types by core components
- ScrollView, CameraRollView, and SwipeableRow have been significantly changed to no longer bind component instances when calling certain methods
- WebKit supports two-way TLS authentication
- Provide resources from directories other than /assets
- Fixed a number of crashes, as well as resolving some accidents
new
general
- Add the publicPath property to support loading static assets from different locations
Android
-
The Bundler service supports Android system-level attributes, making it easier to debug applications across multiple apps
-
Native Modules now support adding an extra parameter of type WritableMap (userInfo) when calling promise.reject. See the implementation in promise.java for details. This parameter can then be retrieved in JavaScript via Error. UserInfo. IOS already does this.
-
Native Modules now expose nativeStackAndroid properties to promises rejected with Exception/Throwable, Enable Javascript to display Native Error stack information via Error. NativeStackAndroid. For iOS, see Error. NativeStackIOS.
iOS
- Add moduleForName: lazilyLoadIfNecessary to rctbridge.h to find modules by name and force them to be loaded. And many other improvements to LazyLoading.
- To increase the WebView setClientAuthenticationCredential method, so that when opened its = {true} two-way TLS authentication
Modify the
general
- Enhance the use of Flow types by core components
- A large number of common components are converted to ES6 classes (ScrollView, CameraRollView, SwipeableRow, ProgressBarAndroid, ProgressViewIOS, SegmentedControllIOS, ToolbarAndroid)
- The Flow version was upgraded to V0.86.0
- Metro version updated to V0.49.1
- Jest version updated to V24.0.0-alpha.6
- The fbjs-scripts version was upgraded to V1.0.0
- Folly version updated to V2018.10.22.00
- Synchronize the React version to 16.6.1
- – Clear error messages during Hot Reloding (last Friday I tried 0.58 and found that reloading sometimes failed, maybe there was a bug)
- You can now add two callback functions to the CxxModules method
A major change
Converted to ES6 component classes, some public methods are no longer bound to instances of that component. Methods affected by this are:
In the ScrollView: setNativeProps / getScrollResponder / getScrollableNode / getInnerViewNode / scrollTo / scrollToEnd / ScrollWithoutAnimationTo/flashScrollIndicators.
In CameraRollView: rendererChanged.
In SwipeableRow: close.
Therefore, it is no longer safe to pass these methods as callbacks to a function by referring to them in a method as references. The automatic binding method of component instances is a behavior of createReactClass that we decided not to retain when we switched to the ES6 class.
Android
- Optimize PlatformConstants ServerHost, PlatformConstants. IsTesting and PlatformConstants androidID performance
iOS
- Change RCTLogWarn() to RCTLogInfo()
remove
- Remove the UIManager. MeasureViewsInRect (), because no one using it for a long time already
repair
- Fixed Yoga JNI Bindings potentially causing UI threads to stall
- Fixed crash caused by race condition during CXX Module registration
- The displayName of the View and Text returns the explicit name
- Repair CLI Execution
react-native init --help
Return undefined - Repair CLI Execution
react-native start
Is not recognized –sourceExts - Fixed Modal visible attribute is undefined or NULL is still accidentally pop up
- Fixed a crash when loading paging data in VirtualizedList
- Fixed an issue where removing a module would cause incorrect stack messages while in debug mode and calculating differential bundles
Android
- Fixed a crash when removing root Nodes
- Fixed multiple deadlocks and Race conditions issues in ReactInstanceManager
- Fixed IllegalArgumentException for ReactModalHostView and DialogManager when dismissing
- Fixed incorrect merge resource paths due to Android Gradle Plugin 3.2
- Fixed an issue with onTimeout callbacks for HTTP connections
- When the remote server starts to shut down, shut down the WebSocket properly
- Fix compatibility issues with Android SDK16 devices
- Image.resizeMode no longer defaults to Scaletype. CENTER, resulting in redundant padding
- Fixed an issue where reverse ScrollView on Android SDK28 would not scroll in the correct direction
iOS
- Fixed inline view not restarting in some cases
- Fixed an issue with ImagePickerIOS previewing and rendering inconsistent images using a front-facing camera
- Fix Race Conditions and crash when JSC is turned off on iOS11 and previous versions
- Fixed crash caused by _firstTimeReachability in NetInfo
- Fixed an issue with inline view not hiding properly
- Fixed crash caused by ScrollView offsets directly referencing content offsets
Recommended reading:
- React Native’s 2018 Year-end Review