Releases: facebook/react-native
v0.29.2
v0.29.1
0.29.0
Thanks to 97 contributors who put 218 commits into this release!
Special thanks to @satya164 for writing this release notes!
Breaking changes
General
- Kill NavigationReducers (3a8b50a) - @hedgerwang
- NavigationExperimental - Clean up NavigationStateUtils (67002e8) - @hedgerwang
- Remove the logic that lets NavigationStateUtils accept empty value as input and return a new state.
- Remove the method
NavigationStateUtils.getParent
,NavigationStateUtils.set
.
- NavigationExperimental - Remove prop
onNavigate
(fb0007d) - @hedgerwang - NavigationExperimental - Define the generic
render
prop for NavigationTransitioner to render scenes (3a62314) - @hedgerwang
Android
-
Change the application template (49f20f4) - @foghina
- Plugins which pass activity reference in the constructor need to be updated to extend
ReactContextBaseJavaModule
usegetCurrentActivity
to get the activity reference. This change is backward compatible. - Apps need to be migrated to use the latest template
Migration instructions for apps
- Create a new file
MainApplication.java
in the same folder asMainActivity.java
- Update it to match - https://github.com/facebook/react-native/blob/0.29-stable/local-cli/generator-android/templates/package/MainApplication.java and move your customisations from
MainActivity.java
to this file - Update
MainActivity.java
to match - https://github.com/facebook/react-native/blob/0.29-stable/local-cli/generator-android/templates/package/MainActivity.java - Add
android:name=".MainApplication"
in the<application />
section ofAndroidManifest.xml
. It should now look like,
<application + android:name=".MainApplication" android:allowBackup="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:theme="@style/AppTheme">
- Clean gradle cache -
./gradlew clean
The experience might vary according to the level of customization you've made. Check this commit to see how UIExplorer and MoviesApp were migrated - dcc2abc
- Plugins which pass activity reference in the constructor need to be updated to extend
-
Remove support for password property and only use secureTextEntry (f3507f9) - @dmmiller
-
Remove the Profiler Option in RN Android Dev Menu (4b19db3) - @lebronJ
iOS
- Automatically clip subviews when
removeClippedSubviews
prop is used (1048e5d) - @nicklockwood - Remove deprecated methods from StatusBarIOS (4de616b) - @javache
General
Bug fixes
- Fix left button moving in instead of fading in in NavigationBar (8731494) - @dragonwong
- Fix incorrect import reference for
emptyFunction
inSwipeableListView
(2fd537c) - @glawson - Fix onLayout support in
<TextInput>
(92926f9) - @paulshen - Don't clobber user-defined environment variables (402e7ea) - @vkarpov15
- Fix polyfillLazyGlobal to work with allowTopLevelThis = false (f9e26b3) - @janicduplessis
New features and enhancements
- Add
log-ios
andlog-android
commands (cf97c9a) - @vitalis - Show stacktrace in YellowBox (8d03857) - @skv-headless
- Add
StyleSheet.absoluteFill
convenience constant (e79f5d7) - @sahrens - Changed version of React dependency to ~ (592d5fb) - @bestander
- Open sourced KeyboardAvoidingView (8b78846) - @nicklockwood
- Allow CameraRoll to export videos (7357ccc) - @corbt
- Clear Debug Console on Reload JS (b03a725) - @yungsters
- Make InteractionManager tasks cancellable (be09ccc) - @sahrens
- Add support for reverse flex directions on Android and iOS (d43e0db) - @feichngr
- Add support for
lineBreakMode
prop on<Text>
(c03b166) - @skv-headless - Fix an issue where scrollview wouldn't unclip its cells (1fcd73f) - @majak
- Make module IDs deterministic when bundling (62bb09d) - @davidaurelio
Android
Bug fixes
- Enable Double R shortcut to reload JS when redbox is shown (4959b21) - @lebronJ
- Fix deletion layout animations to work with custom view managers (49a5fe4) - @astreet
- Fix crash when Modal is displayed as a result of touch handling code (837aafd) - Olivier Notteghem
- Properly validate layout animation config (d4e7c8a) - @janicduplessis
- Fix potential NPE in layout animation deletion code (bb9ed2d) - Olivier Notteghem
- Fix bug where UIOperations aren't executed after hosting Activity is paused (eef03fd) - @astreet
- Remove iOS platform check for running devtools (1b40db7) - @kageurufu
- Fix dialogmodule crashing with no fragment manager in onHostResume (bf79352) - @foghina
New features and enhancements
- Open source permissions module (b7352b4) - @andreicoman11
iOS
Bug fixes
- Fixed bug where layoutSubviews was called continuously for scrollview (329c716) - @nicklockwood
- Explicitly set default background color in RCTTextView (1fce891) - @bnham
- Fixed MapView's draggable annotation (993a928) - @nathanajah
- Handle the case where redirect URL is relative (39eca05) - @maartenschumacher
- Fix unbale to scroll in image cropper (13dfb62) - Wenjing Wang
- Correctly passes localNotification to app on wakeup (57d4523) - @corbt
New features and enhancements
- Add
getScheduledLocalNotifications
(5b4b027) - @joshuapinter - Implement CSS z-index for iOS (d64368b) - @nicklockwood
- Add support for native animations on iOS (19e2388) - @buba447
- Prevent images from flickering when component is reloaded (c8f39c3) - @nicklockwood
- Implemented automatic IP detection for iOS (8c29a52) - @nathanajah
- Support {min,max}{Width,Height} on RCTView (78b8929) - @javache
0.28.0
Thanks to 87 contributors who put 182 commits into this release!
Special thanks to @satya164 for writing this release notes!
General
Breaking changes
- NavigationExperimental - Rename
NavigationState
toNavigationRoute
, renameNavigationParentState
toNavigationState
(807726b) - @hedgerwang - NavigationExperimental - Rename
scene.navigationState
toscene.route
(fb5d0ff) - @hedgerwang - NavigationExperimental - Rename
navigationState.children
tonavigationState.routes
. (1e62602) - @hedgerwang - Remove deprecated
PullToRefreshViewAndroid
andonRefreshStart
/endRefreshing
(a71a9ef) - @janicduplessis - NavigationExperimental - Remove
key
fromNavigationState
. (f7279b4) - @hedgerwang - Updates to css-layout leading to many fixes but requiring some breaking changes:
- flex styling property behavior now behaves slightly differently. If you previously used
flex: 1
where not necessary this change will likely break your layout as the measuring behavior is slightly different than before due to performance optimizations. Removing that unnecessaryflex: 1
will solve your layout in most cases. - Due to performance tweaks
flexWrap: wrap
no longer works together withalignItems: 'stretch'
(the default). If you useflexWrap: wrap
you probably will want to add thealignItems: 'flex-start'
style as well.
- flex styling property behavior now behaves slightly differently. If you previously used
Bug fixes
- Prevent Systrace from including React in the preloaded modules section (4880309) - @javache
- Set statics on the NavigationCard container (1343248) - @ide
- Respect original enumerability/writability when polyfilling globals (3d8725d) - @davidaurelio
- Fixed multiline textinput onChange event (57e9df4) - @nicklockwood
- Fix TextInput autocorrect (#7496) (26aa27d) - @rigdern
- Fixed "Sending
didSendNetworkData
with no listeners registered" warning (bdcdfb0) - @nicklockwood - Fix prop update perf issue with windowed list view (4455426) - @sahrens
- Removed hard-coded DatePicker width (002024c) - @nicklockwood
- Correct semantics for
XMLHttpRequest.responseText
(e293502) - @philikon - Fix header elevation of NavigationExperimental (3f92e09) - @marcobonaldo
- Fix for "Unable to resolve module nullthrows" (1facfb7) - @jgibbons
New features and enhancements
- Show better error message when accessing React APIs on React Native (6069fdd) - @satya164
- Add a removeListener method to DeviceEventEmitter (0e8c3ff) - @rahuljiresal
- Expose Systrace from the 'react-native' package (1e4d9d4) - @philikon
- Add
Array.prototype.includes
polyfill (ed47efe) - @Kerumen - Improve how inspector handles native components (bdab834) - @frantic
- Add cross platform
ActivityIndicator
(26e8426) - @janicduplessis - Hook react-native link calls into rnpm (7028929) - @mkonicek
- Inline
Platform.select
(8c3db97) - @davidaurelio
Android
Bug fixes
- Fix the WebSocket sendBinary error (6c3306d) - @sreesharp
- Add Fresco to ProGuard (3716ce7) - @charpeni
- Fix layout animation to be executed when it shouldn't (a7a34a1)
- Don't close reference to image in getSize (ccd0181) - @ahmedre
- Fix NPE when NetworkingModule runs onCatalystInstanceDestroy (4378ecb) - @bestander
- Fix RefreshControl race condition (bb5aede) - @janicduplessis
- Correctly implement measure callback with measure modes (1767a0a) - @emilsjolander
- Fix leak in Nodes due to removeClippedSubviews (caa2bae) - Ahmed El-Helw
- Use RN version from node_modules instead of jcenter (84f82e5) - @devfd
- Prevent race condition leading to deadlock when destroying activity w/ catalyst instance (80741a1) - Olivier Notteghem
- Fix can't use binary number on android except on debug mode (#7526) (98dd918) - @RobRoseKnows
- Fix Modal when the Activity is paused or resumed (a0562c7) - @dmmiller
- Correctly cancel network calls in catalyst instance destroy (7914d33) - @andreicoman11
- Fix NPE in cancelling network calls (5de1151) - @andreicoman11
New features and enhancements
- Add
Image#getSize
for Android (c1558bc) - @cornedor - Move new bridge java stuff to OSS (3b3b46d) - @cjhopman
- Add support for delete animation in LayoutAnimation on Android (0fb5ccf) - @janicduplessis
- Make "Debug JS" dev menu option persist across app restarts on RN Android (60e0d2c) - @lebronJ
- Build new bridge with gradle (5e8f171) - @cjhopman
- Allow app/build.gradle to specify additional packager arguments (1f2027a) - @philikon
- Allow app/build.gradle to specify how node gets invoked for the packager (58fb91e) - @philikon
- Add progressListener for android when using FormData to upload files (e63ea3a) - @tantan
- Hook up Android intent to Linking.js #7079 (c36430a) - @rreusser
iOS
Bug fixes
- ActionSheetIOS - support share sheet on modals (4446e31) - @grabbou
- TabBarIOS itemPositioning - Fixes #4136 (a45d025) - @grabbou
- Added small decoded image cache to prevent images flashing when component is reloaded (c8f39c3) - @nicklockwood
- Reduce boxing overhead of arrays in uiBlockWithLayoutUpdateForRootView (fc14f85) - @nicklockwood
- Fix scrolling issue on iOS devices. (d31a54a) - @Andreyco
- Fix the Origin: header used in WebSocket requests. (03512fb) - @ewanmellor
- Changed RCTTextView to check for failed focus (7241347) - @nathanajah
- Recenter RCTScrollView when width or height are equal (5961764) - @devknoll
New features and enhancements
- Log image url when image size doesn't match. (eb69d03) - @cpunion
- Enable views to be nested within
<Text>
(486dbe4) - @rigdern - Enable ATS w/ localhost exception for generated iOS proj (0f57702) - @andrewsardone
- Add Shortcut "Double R" to Reload JS (2d32a6d) - @lebronJ
- Support HTTP headers for source prop on
components (ee8496f) - @rigdern
- Promisify PushNotificationIOS requestPermission (f4dbf37) - @JAStanton
v0.27.0
Thanks to 87 contributors who put 210 commits into this release!
Special thanks to @satya164 for writing this release notes!
General
Breaking changes
- Kill NavigationLegacyNavigator (ef44781) - @hedgerwang
- Kill NavigationExperimental Containers (14eb427) - @ericvicenti
- Kill NavigationView (c3714d7) - @hedgerwang
Deprecations
- Keyboard events should now be registered via
Keyboard
module:
// previously
const { DeviceEventEmitter } = require('react-native');
DeviceEventEmitter.addListener('keyboardWillShow', func);
// on 0.27.2 and newer
const { Keyboard } = require('react-native');
Keyboard.addListener('keyboardWillShow', func);
// 0.27.0 & 0.27.1
const Keyboard = require('Keyboard');
Keyboard.addListener('keyboardWillShow', func);
New features and enhancements
- Animated: Implement toJSON method of Animated (17f0807) - @wusuopu
- Make RefreshControl properly controlled by JS (9aa37e8) - @janicduplessis
- Add SwipeableListView (052cd7e 9b1a3c7 2a7f6ae) - @fred2028
- Expose a new prop
transition
for scene renderer. (55c3086) - @hedgerwang - Add support for custom files in BugReporting (610cfdc) - @lexs
- Add "Open file" button to elements inspector (f203c5d) - @frantic
- Add
transform-react-jsx-source
to react-native preset (858643d) - @frantic - Fork NavigationAnimatedView to NavigationTransitioner (7db7f78) - @hedgerwang
- Merge rnpm into react-native (149d0b9) - @grabbou 🎉
Bug fixes
- Protect against JS module call race condition while initializing react instance (a1ba091) - @astreet
- Fix propType check for NavigationCard. (b1cd1cb) - @hedgerwang
- Fix RefreshControl race condition (8fbce30) - @janicduplessis
- NavigationExperimental:
didFocus
event should fired after transition finishes. (8975bb8) - @hedgerwang - Fix RefreshControl on initial render will not beginRefresh when refreshing (cac5ce3) - @aforty
- Fix a bug where NavigationPropTypes.SceneRenderer was a plain object (0e997c6) - @joenoon
- Prevent
SwipeableRow
bleed (5146775) - @fred2028 - Fix 95% of WindowedListView jumpiness (5e91a2a) - @sahrens
- Fix Android flash and iOS juttering (62e588b) - @fred2028
- Fixed incorrect rows reported in onChangeVisibleRows (0aea74e) - @dmueller39
Android
New features and enhancements
- Add pagingEnabled to HorizontalScrollView (a3146e4) - @dmmiller
- Open sourced SwipeRefreshLayoutRecordingModule (457e348) - @bestander
- Implement returnKeyType/returnKeyLabel (dd8caf4) - @Bhullnatik
- Add progressViewOffset to RefreshControl (f7ce0c1) - @UnoDeTantos
- Ability to disable/lock the android ViewPager scroll from props (31250ad) - @kevinejohn
- Fix race condition when clicks are received on react root view and react context is pending (fd37666) - Olivier Notteghem
- Add FpsListener to React Scroll Views (b67d4a2) - Nathan Spaun
- Upgrade to OkHttp3 (6bbaff2) - @AndrewJack
- Fix NetworkingModule construction with interceptors (921d0de) - @bestander
- More helpful error message when react-native start is forgotten (bc634ea) - @codeheroics
Bug fixes
- Fix Android picker controlling (0cd2904) - @spicyj
- Make Modal Status Bar Translucent (191d278) - @jemise111
- Increase the stack size for the React queue on older Android phones (d4f6f61) - @nikki93
- Update the timestamp we send in touch events to be the more accurate (f2c1868) - @dmmiller
iOS
New features and enhancements
- NavigatorIOS: Expose interactivePopGestureEnabled property (4d2c72b) - @rigdern
- Make the root view background color explicit (fa5d1fe) - @shaneosullivan
- Callback with image height and width from IOSImagePicker (df40f48) - @thans
- Enable views to be nested within
<Text>
(fe5c0d2) - @rigdern - Add Copy Stack button to Red Box (5047f6f) - Chris Evans
Bug fixes
- Fix distanceFilter caching for LocationObserver (2310494) - @jrichardlai
- ScrollView: Always fire onScroll event for the resting scroll position (deef8aa) - @rigdern
- Fixed crash due to inserting a nil object into an array in Image loader (ed1ee9b) - @nicklockwood
- Provide correct animation function for hiding keyboard (03edc75) - @rigdern
- Fixed NativeEventListener deregistration (516bf7b) - @nicklockwood
0.26.2
0.26.1
0.27.0-rc
v0.27.0-rc [0.27.0-rc] Bump version numbers
0.26.0
Thanks to 104 contributors who put 223 commits into this release!
Thanks to @christopherdro for writing this release notes!
Breaking changes
- React API must be now required from
react
package (previously a warning on 0.25) setBridge
is no longer called on the main thread - 34ec6a9
New features
- Upgrade to React 15.0.2 ba8878d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2
- Add support for sending and receiving binary data in websockets - ed930b4 20cae51
- Add
--version
to CLI - 856f9e9 - Add
--reset-cache
toreact-native bundle
- 90f9f48 - Add encoding/hash signature to JS files - 34dd17c
Platform.select
#7220
Bug fixes
- Fix potential "Should never unset includeInLayout" invariant - ecae44a
- Fix initial scenes rendering in NavigationExperimental - 81c62c5
- Fix incorrect layout for modal - 85f7569
- Fix stroke bug in ART - 4e5c85b
- Fix a bug in asset server when using relative project roots - 3881694
- Fix
flow
definitions for react-native - 248879f 91d4a09 - Removed exported constants for fixed-size views - c1aff6b
- Fix usage of react-native cli inside package.json scripts - 8295d27
- Fix WebSocket compatibility with event-target-shim ^1.0.5 - 8891f22
- Fix JSWatchdog reset - 1d802da
- Fix Animated setValue to work properly on natively driven nodes - 6c80f88
- Fixed path to regenerator-runtime - ec5016a
- Fix HMR preset - a2ee5bd
Android
New features
- Add ability to disable scroll on ViewPager - 5a93877
- Add ability to expose sync hooks from Java to JS - 50d8d46
- Add an option to load the Boost library from the filesystem - bc32e06
- Add Support for Animated.add in native animations - b5375bd
- Add support for setChildren - 3a5457c
Bug fixes
- Fix crash in AdsManager by no longer assuming only one react context exists at once - 0a7a228
- Fix crash caused by accessibility being turned on and using a Modal - 57c40d9
- Fix Popover location in Events - 8e7ea11
- Fix NullPointerException in setFontWeight method - 1fb8643
- Fix IndexOutOfBoundsException in MapView - 446d7b7
- Fix undefined
ref
in PullRefreshViewAndroid - d586daa - Fix events bubbling out of the Popover - eb21b25
- Fix ReactNativeART arc drawing - 1af4760
- Fix ClassCastException inside TextInput - f323b02
- Fix textShadowOffset error without width or height - 3f0207d
iOS
Breaking changes
- Add flag "-lc++" for all checked-in projects - 8aa82d3
New features
- Add support for delete animation in LayoutAnimation - baa3668
- Add support for badge icon number and alert action when scheduling local notification - 84e6968
Bug fixes
- Fix deadlock during app startup - 9547a98
- Fix RCTJavaScriptContextCreatedNotification - e195bf9
- Fix autocomplete in rich-text editing mode for CJK text input - 91dcc9a
- Fix some issues with zero fontSizeMultiplier causing RCTShadowText measure function to return an infinite height - 362738a
- Fix memory leak with cookieMap in RCTJSCExecutor - 32a8949
- Fix images not displaying with HTTP response 301 - 192ab66
- Fix pressing a stack frame in Redbox not opening an editor - 037e9ba
0.25.1
Thanks to 90 contributors who put 154 commits into this release.
Special thanks to @radko93 for writing these release notes!
Deprecations
Requiring React API from react-native
is now deprecated - 2eafcd4 0b534d1
Instead of:
import React, { Component, View } from 'react-native';
you should now:
import React, { Component } from 'react';
import { View } from 'react-native';
You can also try this codemod built by the community to automatically rewrite all the imports.
New features
- Add support for JavaScript third-party debuggers - 4c8a9f0
- Add key to footer wrapper in WindowedListView - 58db9f3
- Add support for missing XHR response types - fcc89e9
- Add a way to prefetch remote images to cache with Image.prefetch - f7bcb3e
- Add transform-es2015-function-name to the react-native babel preset - 855c0cc
- Add instructions to reload simulator for non-QWERTY keyboards - c417c2e
- Add support for ontimeout and onerror handler when using XMLHttpRequest for Android and iOS - d09cd62
Bug fixes
- Add null check before accessing the refresh control ref - eac617d
- Fix HMR on Windows - c61100d
- Fix up PanResponder example - 05a852a
- Fix an issue when the title in NavigationExperimentalHeader would block touches for the left component - 86d5c52
- Fixed images required from node_modules - d0566d8
- Fix an edge case in hot module reloading - 41576ea
- Fix warnings in UIExplorer example pages - 528cf68
- Fix perf tab missing key warnings - b7a3272
- Fix swiping in navigator too quickly causes the gesture to be lost - ca2fb70
- Fix border radius / background propagation issues in TicTacToe example - 97f60ad
- Fix race conditions in Portal when simultaneously closing/opening - 7354ff3
- Fix ImageEditingManager when no external cache - fffcb9c
- Fix RefreshControl refreshing state - 93b39b7
Android
New features
- Added support for textDecorationLine style prop on Android - 2039be9
- Added support for Image corner radius on Android - 69534a3
- Added WebChromeClient as default WebView client f94abd3
Bug fixes
- Fix DrawerLayoutAndroid method parameter - d66b944
- Fix DrawerLayoutAndroid not able to set opacity - 7851572
- Fix an issue with removeClippedSubviews and TextInput - 89340f1
- Add support for WebSocket protocols argument - 914f33c
- Fix systrace logging reported by RUN_JS_BUNDLE - 2d0051f
- Fix Promise argument assertion to take into account executorTokenOffset - e27a27b
- Fix Modal crash caused by accessibility bcf91bc
iOS
New features
- Added cache prepare step for packager in ios e2e test - a6a5ef4