React Native 0.33 正式版发布
-
从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
...
以及其他所有的原生组件。This release requires React ~15.3.0.
General
Bugfixes
-
Fix off-by-one error in range requests (<tt>a241706</tt>) - @nikki93
-
fix CSSNodeList memory leak (<tt>7b02c1d</tt>) - @ymmuse
-
fix method overriding when using native animations (<tt>b7903e4</tt>) - @foghina
-
fix error handling in react native heap capture server middleware (<tt>c43c80b</tt>) - @cwdick
-
Fix building without writing a source map (<tt>a567898</tt>) - @davidaurelio
-
Fix Scrolling in YellowBox (<tt>c36d356</tt>) - @yungsters
-
Fix module IDs of initial require calls (<tt>f83c869</tt>) - @davidaurelio
-
Ensure NavigationTransitioner props.onTransitionEnd happens after scene cleanup (<tt>de9d22e</tt>) - @ericvicenti
-
Accept children of all types for NavigationHeaderTitle (<tt>02557d2</tt>) - @nevir
New features and enhancements
-
Add
--config
option to CLI to allow passing a path to anrn-cli.config.js
(<tt>757ab0b</tt>) - @skevy -
Add support for flex-grow, flex-shrink, and flex-basis (<tt>0ea4198</tt>) - @emilsjolander
-
Remove shouldComponentUpdate policy from NavigationCard and NavigationCardStack (<tt>6c4d3c3</tt>) - @ericvicenti
-
Make reloads faster for simple file changes (<tt>3f504ec</tt>) - @davidaurelio
-
Define Flow types for style and stylesheet objects, more checking (<tt>8eed600</tt>) - @ide
-
Run
adb reverse
for all devices using run-android with multiple devices (<tt>dd6370f</tt>) - @jreziga -
Add onComplete callback to animation config (<tt>26e8ae7</tt>) - @vaukalak
-
Provide RTL support in NavigationCardStack (<tt>fc864a2</tt>) - @MengjueW
-
Scroll multiline textinputs when focused (<tt>0082517</tt>)
Android
Bugfixes
-
Fix scale transform on Android (<tt>12fb313</tt>) - @janicduplessis
-
Fix onItemSelected firing for ReactPicker on initial layout. (<tt>a2a8d7f</tt>) - @donyu
-
Fix border color (<tt>805d060</tt>) - @emilsjolander
-
InterpolationAnimatedNode fromDoubleArray should support the string type (<tt>53c1da0</tt>) - @leeight
-
Fix setting numberOfLines to 0 behaves differently than on iOS. (<tt>dba1ce4</tt>) - @manicakes
-
Store borderColor in a non lossy way (<tt>8095707</tt>) - @manicakes
New features and enhancements
-
Add transform support for native animated on Android (<tt>df05311</tt>) - @janicduplessis
-
Add JS library for requesting Android M Permissions (<tt>0fb2ccf</tt>) - @cmcewen
-
Add 'center' to the allowed values in Android Image.resizeMode proptype (862b657) - @alonsch
-
Add
checkAndroid
back (<tt>6f7ade1</tt>) - @jreziga -
Always log exception in DevSupportManager (<tt>e4d5dcb</tt>) - @lexs
-
Add RedBoxHandler & UIImplementation to ReactNativeHost (<tt>baf5a5b</tt>) - @foghina
-
Add ReactFragmentActivity, share delegate with ReactActivity (<tt>3c4fd42</tt>) - @foghina
-
Add @ReactModule annotation (<tt>0561336</tt>) - @AaaChiuuu
-
Add
isPrefSet
andsetPref
to make I18nUtil cleaner (<tt>380830e</tt>) - @MengjueW -
Add LazyReactPackage (<tt>1feb462</tt>) - @AaaChiuuu
-
Add Activity to onActivityResult listener interface (<tt>fbd2e13</tt>) - @foghina
-
Support for spring animations (<tt>8f75d73</tt>) - @kmagiera
-
Implement cancelable option for Alerts (<tt>8e2906a</tt>) - @kraffslol
-
Support 64 bit platforms (<tt>fc5bed8</tt>) - @emilsjolander
-
Add native decay animation (<tt>2a7f4be</tt>) - @foghina
iOS
Bugfixes
-
Fix memory leak bug in RCTModalHost (<tt>915345b</tt>) - @Roshanjossey
-
Fix tabs in project.pbxproj of iOS template (<tt>f89f09f</tt>) - @jhen0409
-
fix static jsc build for ios (<tt>94ac3e4</tt>) - @bnham
-
Fix RCTRootView invalidation using the wrong bridge (<tt>4afaf5e</tt>) - @javache
-
fix loading of dynamic linked JavaScriptCore on iOS simulator (<tt>ce2f119</tt>) - @bnham
-
Fix warning on unused return values in RCTSRWebSocket (<tt>2f78852</tt>) - @javache
-
Fix styling of system fonts (<tt>e30327c</tt>) - @javache
-
Fix missing font constants on iOS7 (<tt>6b9406e</tt>) - @javache
-
Fix image source prop change updating image (<tt>7cdd4c9</tt>) - @alexanderjarvis
-
Fix snapshottests under iOS10 (<tt>a0b3565</tt>) - @javache
-
Centre text in case where the distance between baselines is larger than the font size (<tt>68d483e</tt>) - @jacobp100
New features and enhancements
-
Add iOS support for CSS property font-variant, accepting tabular-nums… (<tt>f951da9</tt>) - @jacobp100
-
Add some defensive cleanup of cancelBlock in RCTImageLoader (<tt>1418828</tt>) - @javache
-
Add support for animated value listener (<tt>0e204e1</tt>) - @janicduplessis
-
Initial implementation of adjustsFontSizeToFit. (<tt>c6b6f53</tt>) - @MattFoley
-