React Native December 2017 (v0.52.0) released
v0.52.0 on GitHub (npm)
This release had a lot of work around the bundler and packager, a ton of bugfixes, and updates to many of React-Native's dependencies. Lots of under-the-hood work was done as well to improve the layout engine. Happy new year!
If you would like to help us with the next release changelog, please contact @grabbou
New features
- Introducing justifyContent: space-evenly (1050e0b by @woehrl01)
- Debug JS in Nuclide is now an option in the dev menu 🐜 (7c7108a and de424cc)
- DatePickerIOS now takes locale 🌍 (fd9c361 by @RobertPaul01)
- CameraRoll can now deletePhotos 📸 (554e873 by @fxfactorial)
- Introducing PlatformOS – it looks a lot like Platform, but with a simplified API (5ee27ff by @brishin)
- There's now an API to specify a different directory for iOS image assets (8f9b291)
- Support for custom accessibility actions on iOS (36ad813 by @ericdavmsft)
- New experimental RCTSurface: measure and layout a UI in a thread-safe and synchronous manner (be6976d, 7df58e2, e75bd87, aa83b5a, 081f7d1, da17b23, e9e0cd7, 43b2509, ba60751, d71d28f, 4d37cf0, and d021dd2 by @maicki and @shergin)
- Experimental SwipeableRow's datasource now has a
getLastRowID
method (d79e245) - React Native monthly #5 was added (3c5a55d by @tenodi)
Deprecated
- Ignore YellowBox warnings with
YellowBox.ignoreWarnings([...])
rather thanconsole.ignoredYellowBox = [...]
(26038f5 by @wli)
Changed
- Metro-bundler is now metro, and it's v0.24.1; there were some performance increases at the cost of a few breaking changes; improved tests of the bundler too (0bbd9f0, a2fd3fc, 503b452, 654fed4, 0091496, aba148f, 3d5dc87, 48019a0, ecec431, f4d627c, f871d25, a7b231a, 830b431, 29dafa1, 7a5d5a4, 4cd685a, d326c86, 231c7a0, 7d969a0, ae51730, f587f8d, fbf0aed, e9393f6, and 968c88d by @cpojer, @hramos, @jeanlauliac, and @rafeca )
- React is now v16.2.0, and it took react-test-renderer along with it; now with more fragments! 🎉 (c7f3707 and cd938d7 by @bvaughn)
- react-devtools-core is now v3.0.0 (a7d46ea by @rsnara)
- Jest is now v21.3.0-beta.13 (16bbd90 and ec2ea58 by @mjesun)
- Flow is now v0.61.0, and there were a ton of Flow fixes/coverage improvements made (914ae93, eb0d647, c8e72bb, 2d4bedb, e0202e4, 2be3ae1, 22a1419, 6ae0b34, 76a2ca4, 3259353, e6c1fb7, 61d046b, 820cfa1, 240039c, 343c5a9, 5f8d8e9, and da04796 by @Ashoat, @calebmer, @cdlewis, @deecewan, @grabbou, @jamesisaac, @mroch, @nmn, @nmote, @sahrens, @samwgoldman, @TheSavior , and others)
- Split out docs to their own repo (and a few formatting fixes along the journey) 👋 (2d86618, 64d80b1, 3362da4, 75123c6, and 79e24ed by @hramos)
- TouchableHighlight now has a default delayPressOut value of 100; it was also refactored a bit for style (ee8a7b4 by @sahrens)
- When in a dev build, more robustly validate arguments for native methods (ea2e2c5 by @mhorowitz)
- On integration tests, report all errors (3bcb912 by @sahrens)
- Android debug overlays (like RedBox, dev menu, loading) are no longer are system overlays; they're now part of the currentActivity (d19afc7 by @kmagiera)
- Yoga has less technical debt, thanks to replacing YGNodeList with vectors (b08a912 by @priteshrnandgaonkar)
- Improve iOS's accessibilityLabel performance by up to 20% 📈 (19b0a65 by @chendo) - Yoga is now cpp, compiled as c++1y (d7ab949 by @priteshrnandgaonkar)
- Bundle segments are handled better and used more (6812789, a47431e, 963c61d, b9f21dc, f125818, and 1988ba1 by @fromcelticpark and @jeanlauliac)
- packager-worker-for-buck has better tests (7fd5aa8 by @jeanlauliac)
- RCTUIManager has less technical debt (71b498b, 60dc9be, and 21714fe by @shergin)
- Numerous bridge changes, especially around URL resolution (e7bd0f0, 260e6d2, 4894ac4, b983de9, b0193b0, ae5ef65, and 1d6ce23 by @fromcelticpark and others)
- Native components on Android register lazily rather than via ViewManager (1b71e03)
- Various cleanup and refactoring (0537763, 0984f29, 6c70975, d950dc6, 70c3590, cfa2bbf, and 850efa8 by @bnham, @priteshrnandgaonkar, and others)
- Jest preprocessing now uses the AST from metro (2ae255a and d5b5951 by @rafeca)
- renderApplication() now supports async initial render (1b22d49 by @bvaughn)
- Welcome @lwinkyawmyat to the React Native GitHub Issue Task Force (4ebe76d by @lwinkyawmyat)
Bug fixes
- Fixed autoscroll to cursor on Android TextInput (0bef872 by @shergin)
- Fix
backgroundColor
on TouchableHighlight (5a1171e by @sahrens) - Various corrections in messages, comments, and docblocks (58c3bc4, 354e1cb, 58edf02, b9e7006, d2f0abd, 94cd9f5, 8547b7e, 44c1649, c91d872, 85503a0, and 5b83dbe by @behrends, @bvaughn, @charpeni), @dsandmark, @gusgard, @nkabrown, @petterh, @solon, @swashcap, and others)
- Various dev doc and project doc fixes for correctness and completeness (92c0980, 3c9092a, e906525, 6082856, c49b97c, 45ed142, cb6ec7c, 9ec9567, e5a4ea9, c544c0d, 33d5e5b, 95dac8d, 6e1db1f, e11d496, 6da8979, 0ff5760, 1ee64cc, 3aa3856, 6b26971, and de3976a by @adrianomelo, @blargity, @charpeni, @garlic-rice-with-butter, @gwmccull, @harikrishnanp, @hramos), @johnthewilson, @jsdario, @kelset, @patrickkempff, @ryanml, @tiagomoraismorgado88, @timwangdev, and others)
- Fixed podspec include/excludes around tvOS (ba1d7e9 by @yygene)
- Stop RCTRefreshControl from jumping around (2e1707d by @sophiebits)
- Don't spam the logs for iOS when receiving ECONNREFUSED on connecting to packager (b1701cc and ff3dc2e by @adamjernst)
- Make Android
lineHeight
behavior match iOS's 📏 (3f1b021) - iOS RCTEventEmitter uses a double for count, not NSInteger (eaa8499)
- Fix
isNuclideDebuggingAvailable
on iOS (59c3e33) - Fix a race condition in the animation module (515eb0e by @mhorowitz)
- iOS ScrollView is now rendered correctly with RefreshControl (75d62bf by @vonovak)
- Fix Windows local-cli's to not wrongfully identify as globally installed (ca10604 by @sballew)
- Fix Jest mocks for NetInfo, Dimensions, and ScrollView modules (7fb3a92, 11a2a35, and 0c8a3e4 by @alvaromb, @timwangdev, and @uk-ar)
- packager-worker-for-buck: transformCommand: add missing test (73a01be by @jeanlauliac)
- Fixed issue where CLI wasn't following the config value for postMinifyProcess when its running with dev=false (6d92046 by @rafeca)
- Fix asset resolver url handling (28d5d6b by @fkgozali)
- Fix crash when destroying catalyst (f101566)
- Prevent an Android crash when TextInput has
selectionColor
defined but there is no drawable cursor (1e18d90 by @gpeal) - Fix
borderRadius
with Android API level < 18 (5aa1fb3 and ca7fe72 by @rsnara) - You can now
justifyContent
while you'reminWidth
ing andmarginLeft
ing; before the justification wasn't honored (f5beceb by @woehrl01) marginLeft: auto
andalignItem: stretch
now play nicely together; before the width and height ended up incorrect (5f99b1a by @woehrl01)- Fix Android crash when blurRadius is between 0 and 1 (dc01eff by @jamesreggio)
- Fix assertion preventing YGNodeLayoutGet* with YGEdgeEnd (a383b8c by @justjake)
- Fix shrinking in non-strech alignments (1d62848 by @woehrl01)
- Fix logging unpacking time on Android when it happens concurrently with eager unpacking (028b64b by @alexeylang)
- Correctly calculate min/max percentage constraints (4fdaf2d by @woehrl01)
- Don't throw BadTokenException and IllegalArgmentException when showing or dismissing Modal on Android (c465599)
- Don't crash Systrace when debugging JS remotely on iOS (e8eec24 by @alexeylang)
- Fix a crash when keyboard is visible and bridge reload happens on iOS (d9c6585 by @fromcelticpark)
- RedBox now appears beneath the status bar on iOS (33cefc1 by @adamjernst)
- Explicitly
#define isnan __builtin_isnan
for Android clang-5 to mimic gcc's default behavior (f8fe6b0) - Prevent iOS crash on receiving bad unicode in XMLHTTPRequest (1c04cee by @cdlewis)
- Define
pod_target_xcconfig
for PrivateDatabase (38b96cd by @ide) - When running
react-native-git-upgrade
, don't execute git's hooks (0182086 by @adrienthiery) - When running
react-native-git-upgrade
and failing with a signal, return that to the terminal (b9a5862 by @mateusz-) - In KeyboardAvoidingView, don't mistakenly try to layout when a hardware keyboard changes (ad4450a by @koenpunt)
- Don't endlessly collect websockets when not connected to the packager (dev memory leak) (1e1e491 by @mmmulani)
- Fractional border widths on iOS are now the right size, honoring insets (15179f1 by @Nikita2k)
- Implement requiresMainQueueSetup in RCTTVNavigationEventEmitter to satisfy XCode warning (ee3532b by @charpeni)
- Support the iPhone X in the sample project's header (ad4b124 @vincentriemer)
- Fixed a bug in the sample project random
selection
prop that made it not-so-random (766f020 by @rozele) -testID
works on TabBarItem on iOS (e19d9de) - Correctly update NetInfo on Android even if connection types change while the app is in the background (e6f542d by @berickson1)
- Direction-aware borders now work with Android APIs >= 17 (7170543 by @rsnara)
- On iOS, don't error on the first live-reload of large codebases because of too little wait time (b6f1a60 by @lelandrichardson)
- Don't have XCode warnings for YGDefaultLog in newly created projects (72e762d by @woehrl01)
Deprecated
- Removing
reactBridgeDidFinishTransaction
from RCTScrollView (a255204 by @shergin) - Removing inherited background color optimization from RCTText to reduce code complexity – please give feedback if you find performance differences! (8c8944c by @shergin)
Other
Below is a list of the remaining, low-level changes that made it into this release of React Native.
- Add Systrace-based telemetry to Hermes GC. 05e862d
- Unify Systrace native hook argument passing. 52e3ae9 @amnn
- Use different symbols for SystraceSection depending on WITH_FBYSTRACE 03956c4
- Don't set global.performance to undefined if it was initialized already dfebcb7 @alexeylang
- Autofixes for migrating to Buck's source-only ABI feature 801cbdb @jkeljo
- Add remote API to uninstall the global error handler in RN 1d16923
- Add RCTLibraryPathForURL in RCTUtil (2fecbf6)
- Fix sections that come from React Fiber (1f40c95 by @alexeylang)
- Fix boolean conversion in sync RN method calls. dd888d3
- Fix embeddedBundleURL update situation d1fc8ef
- Remove android_react_native_perf.use_separate_ui_bg_thread experiment. 4f886a2
- ScrollView related files were moved to dedicated folder 098a63a @shergin
- move page registration logic in to jsinspector bef7967 @bnham
- Type global hooks as function pointers eca51eb @johnislarry
- std::string to const char* b952365 @johnislarry
- Allow extending props supported by native animations 71751e9 @andrewimm
- Meyers singleton jsc error extractor 434f432 @johnislarry
- Do not overwrite the same text in ReactEditText 29f3f55
- Renaming uiManagerWillFlushUIBlocks -> uiManagerWillPerformMounting 0a8721c @shergin - Skylarkify flags macros. ed2bfcb @ttsugriy
- Skylarkify config_utils_defs macros. 88f6f69 @ttsugriy
- Round size geometry for Button and RichText components. 4034feb - @iaroslav-pavlov
- Temporarily patched Map/Set non-extensible check into RN dev renderer a99f0d6 @bvaughn
- Run buildifier over all BUCK files d674d48 @zertosh
- Pass scriptURL to RCTTestRunner 266ab7a
- Make RCTNativeModule::invokeInner explicitely return folly::none in case of error 0ac5a52 @fromcelticpark
- Make RCTPackagerConnection a singleton 9180d4e @adamjernst
- Register split segment paths with RAMBundleRegistry cff0d8e @fromcelticpark
- check if listener is still in the set before calling onHostResume ad89ea7
- export SeparatorsObj type for re-use in ListItems etc. c6fe101 @sahrens
- Do not mark node as dirty if, new and old values are undefined 41da6e3 @woehrl01
- Remove RAMBundleRegistry subclasses 6ecae73 @fromcelticpark
- Fix minimumViewTime in ViewabilityHelper (d19d137)