React Native 0.32 正式版发布
-
从0.18开始,RN默认项目全面转向ES6,语法大变化,请参考此贴学习 http://bbs.reactnative.cn/topic/15/
重大变更
在react-native中引用React的做法发生了变更(在当前版本老的做法会报错):
之前
import React, { Component, View } from 'react-native';
现在
import React, { Component } from 'react'; import { View } from 'react-native';
具体哪些属于React,哪些属于React Native,可以参考这篇帖子(需要科学上网)。
我摘录如下:
"react":
Children
Component
PropTypes
createElement
cloneElement
isValidElement
createClass
createFactory
createMixin"react-native":
hasReactNativeInitialized
findNodeHandle
render
unmountComponentAtNode
unmountComponentAtNodeAndRemoveContainer
unstable_batchedUpdates
View
Text
ListView
...
以及其他所有的原生组件。Breaking changes
- NavigationExperimental: Rename
renderOverlay
torenderHeader
(<tt>ca85311</tt>) - @hedgerwang - NavigationExperimental: Stop using absolute position for NavigationHeader. (<tt>38979f9</tt>) - @hedgerwang
Android
Bugfixes
- Fix BackAndroid subscriptions calls (<tt>b857631</tt>) - @webzepter
- Fix onLayout support in for Android (<tt>2ca2f87</tt>) - @antoinerousseau
- Fix ViewPager behavior with Nodes (<tt>5f41769</tt>) - @ahmedre
- Fix NullPointerException Caused by manageChildren (<tt>c21d3a1</tt>) - @ASCE1885
- Webview: Fix broken fullscreen modals due to zero body height. (<tt>1bb1385</tt>) - @danielbraun
- Fix cleanReactNdkLib task failure caused by module not found (<tt>37df151</tt>) - @xinthink
- Fix ScrollView bounce back bug in open source (<tt>36ca1a0</tt>) - @astreet
- Support API "scrollTo" in RecyclerViewBackedScrollView on Android (<tt>235c059</tt>) - @lebronJ
- Stop Reload Android Webview On Same URL Before (<tt>9fa4fe2</tt>) - @skatpgusskat
- Make sure multiline TextInput is scrollable within a ScrollView (<tt>b05c7f7</tt>) - @shengmin
- Fix inset padding handling for TextInput in LTR/RTL (<tt>46bac5f</tt>) - @MengjueW
- Change the textalign setter to support RTL (<tt>54a4450</tt>) - @MengjueW
New features and enhancements
- Add missing resizeMode prop on Image Android (<tt>f634a0f</tt>) - @Bhullnatik
- Add Report Button for Android Redbox, enabled in Ads Manager, Groups and FB4A (<tt>75e404b</tt>) - @lebronJ
- Add Share module (<tt>3b35732</tt>) - @deminoth
- Activity indicator: add size prop (<tt>63d15af</tt>) - @fadils
- Add GIF and WebP support specification with Fresco 0.11 (<tt>55bc825</tt>) - @charpeni
- Make getCurrentActivity public on ReactContext (<tt>7606564</tt>) - @marcshilling
- Implement native Animated value listeners on Android (<tt>158d435</tt>) - @janicduplessis
iOS
New features and enhancements
- Implement multi-source Images on iOS (<tt>fd48bc3</tt>) - @DavidGoldman
General
Bugfixes
- Fix double React perflogger creation (<tt>82c8129</tt>) - @javache
- Fix navigation card stack pan responder (<tt>c658cc5</tt>) - @ahanriat
- Fix CSSLayout to Support RTL (<tt>873c6ff</tt>) - @MengjueW
- Fix scoped modules in
react-native link
(<tt>8ad748a</tt>) - @Kureev - Fix corrupted
options()
call for link and other commands (<tt>504b516</tt>) - @grabbou - Fix console.table polyfill when entries are missing (<tt>0dd93b6</tt>) - @sahrens
- Open to correct line on Webstorm, IntelliJ and AppCode (<tt>c3e8c82</tt>) - @rh389
- Fix --reset-cache no longer accepting a boolean parameter. (<tt>b21c8f1</tt>) - @danielbraun
- Don't show keyboard shortcuts with redbox on device (<tt>0093dcc</tt>) - @brentvatne
New features and enhancements
- Add UI to show intercepted network information in the inspector (<tt>ecea0ce</tt>) - @lebronJ
- Intercept XMLHttpRequest network operations and gather their information in inspector tool (<tt>f20d5ed</tt>) - @lebronJ
- Enable websocket interception in RN network inspector tool (<tt>43f73f6</tt>) - @lebronJ
- Add method popN() to Navigator. (<tt>bbe95c2</tt>) - @yueshuaijie
- Add TextInput.dataDetectorTypes prop. (<tt>15bf2c5</tt>) - @yueshuaijie
- Add partial support for symlinks in packager (<tt>5cf7f04</tt>) - @Kureev
- Don't collect warnings if yellow box is disabled (<tt>654a360</tt>) - @davidaurelio
- Improve error message when packager is not running (<tt>73f3713</tt>) - @javache
- Add a
statusBarHeight
prop for NavigationHeader (<tt>341b29d</tt>) - @corbt
- NavigationExperimental: Rename
-
从0.28开始,modal在android 平板就无法全屏了?? 横屏的时候只显示一半。
-
@vivianchen https://github.com/facebook/react-native/issues/7708
官方表示知道这个问题,但暂时无人接盘处理。建议找第三方modal库或自己实现。