React Native December 2016 (v0.40.0) released
v0.40.0 on GitHub (npm)
This is the first release with the new monthly cadence, so 0.40
is known as December 2016
. The next version will be 0.41 - January 2017
, and will be released at the end of the month.
Breaking Changes
iOS native headers moved
This change affects all native modules and application code on iOS that refer to react native
.h
files
After e1577df, Native code on iOS must refer to headers out of the react namespace. Previously the following would work:
#import "RCTUtils.h"
But now all headers have been moved:
#import <React/RCTUtils.h>
This means that all iOS native libraries need a major version bump for RN 0.40. We attempt to minimize changes of this magnitude, and we apologize for any inconvenience caused.
require('image!...') no longer supported
Support for require('image!…')
, which has been deprecated for a long time, is now removed. If you are still loading images that way in your apps, make sure to check the documentation for alternatives.
getTransformModuleOptions is removed
If you were having custom rn-cli.config.js
in your app and for some reason, using getTransformModuleOptions
, make sure to check @davidaurelio commit ca58e0a for details on the changes.
Android
Bugfixes
- Fix WebView crash for links of unknown schemes (35e75c8) - @rigdern
- Fix Overlay for Marshmallow 23+ (e335ca0) - @jpshelley
- Stop silently failing for requires on Android (63eb4df) - @javache
- Fix SamplingProfiler and HeapCapture for apps that lazy load react modules (d919eb7)
- Call handleUpdateLayout even if the content didn't change (fb23000) - @Kerumen
New features and enhancements
- Add ability to specify main Activity in run-android (9fb520e) - @grabbou
- Add disableExtractUI prop to TextInput on Android (1b870d2) - @rigdern
- Add DatePicker mode configurations (eaccd7e) - @pandiaraj44
- Enable apps to provide a custom configuration to Fresco (8b199a7) - @rigdern
- Speed up EventEmitter
emit()
by ~50% (c4046d6) - @Venryx - Enable ad-hoc dependencies to be pre-downloaded (aac8daf) - @rigdern
- Keep ScrollView content visible after edits (528a3c7) - @rigdern
- Decrease cost of reflection (911c05a) - @rigdern
- Update android gradle plugin version to 2.2.2 (3ee5c5b) - @raycohen
- Expose Android's includeFontPadding for
Text
(7b3e67d) - @benvium - Handle "Never Ask Again" in permissions and add requestMultiplePermissions (51efaab) - @cmcewen
- Remove Jackson dependency (6fef014)
- Remove REACT_HEADERS from RN BUCK file (9024998) - @javache
- Implement onViewAppear by creating a new EventListener on ReactRootView listening for when it's attached to a RN Instance (e06b8db) - @donyu
iOS
Bugfixes
- Fix autoCorrect doesn't revert to initial state (8016d83) - @rigdern
- Fix NativeAnimation invalidation & races on iOS (c858420) - @ryangomba
- Fix an image loader crash (70d4023) - @rigdern
- Fix iOS Picker item colors (4dea892) - @JakeDawkins
- Fix dequeueTasks crash in image loader (d043775) - @rigdern
- Remove deprecated RCTReloadNotification (cd2b384) - @javache
- Fix LayoutAnimation delete scaleXY animation (fc23784) - @rcaferati
- Fix memory leak in Chrome debugging (230de71) - @EmingK
- Fix shake to open Dev Menu only work once (abf1438) - @VojtechBartos
New features and enhancements
- Introduce spellCheck prop to TextInput (0e55f5b) - @rigdern
- Make run-ios find if a device is booted better (0b5ff0d)
- Start exposing RCTWebSocketObserver using a protocol (48cb8d3) - @adamjernst
- Add fastlane to default
.gitignore
(5e008c9) - @KrauseFx - Move all header imports to "" (see breaking change notes) (e1577df) - @javache
- Remove deprecated push notification method info (9c7952d) - @sharnik
- Add badgeColor property (a50bafa) - @skv-headless
- UnselectedItemTintColor property available since iOS10 (8378142) - @skv-headless
General
Bugfixes
- Fix up recent fix to flex basis and put it behind an experimental flag (dad5204) - @emilsjolander
- NavigationExperimental: Fix animation in fast navigation between scenes (df43cc7) - @gitim
- Fix invariant in scrollResponderZoomTo (20e99f5) - @gre
- Fix double callback invocation in
ModuleGraph/Graph
(021b313) - @davidaurelio - Fix usage of weak references to check for null (4902a03) - @emilsjolander
- Fix a bug in determining if yarn is available (9b53408) - @mkonicek
- Fix packager asset requests on windows (d77b4fd) - @janicduplessis
- Fix the parse error when specifying an unknown version (c2db59e) - @ncuillery
- Fix babel 'strict mode' error (5478649) - @karpoff
- Red Box should open PyCharm at line number of error (be16907) - @bigsassy
New features and enhancements
- ScrollView: Don't dismiss keyboard when tapping another text input (552c601) - @janicduplessis
- Add support for aspectRatio style prop (5850165) - @emilsjolander
- Packager: add GlobalTransformCache (5d30045) - @jeanlauliac
- Add CLI basics in docs (5e8e6b8) - @GantMan
- Add
deprecated
flag for nativeImageSource (1fe0f4d) - @frantic - Add StyleSheet.setStyleAttributePreprocessor (346858a) - @brentvatne
- Packager: Cache assets only for production environment (d196ca7) - @grabcode
- Dispatch native handled events to JS (b49e7af) - @janicduplessis
- Packager: Bring back programmatic API (f9d80a4) - @davidaurelio
- Read byte code format version from custom JSC executor only if custom JSC is enabled (b4dbf2b) - @indragiek
- Update Flowconfig in CLI template to Flow v0.36.0 (eb45367) - @mkonicek
- Packager: Module: better type for transformOptions (c284e0c) - @jeanlauliac
- Packager: Bundler: use transform module hash instead of mtime (e485f69) - @jeanlauliac
- Packager: Bundler: use stable paths for cache key (188093a) - @jeanlauliac
- Packager: Bundler: hash all the cache key components (6740207) - @jeanlauliac
- Packager: GlobalTransformCache: better aggregation (9b9fd2f) - @jeanlauliac
- Packager: GlobalTransformCache: globalized keyOf (cb254d1) - @jeanlauliac
- Packager: Module: gives global cache more retries (59873d7) - @jeanlauliac
- Packager: Kill
shouldThrowOnUnresolvedErrors
option (b1fd7bd) - @cpojer - Packager: Make legocastle script to write to the global cache (46f8eb0) - @jeanlauliac
- Packager: Support relative paths in haste map (6c65cda) - @davidaurelio
- Packager: ModuleGraph: Also call back with module objects of entry points (88409f6) - @davidaurelio
- Change
isPolyfill
totype = 'module' | 'script'
(da079f7) - @davidaurelio - Kill fastfs (6554ad5) - @cpojer
- CLI: Allow configuring the way CLI installs react-native (8f0aed6) - @mkonicek
- CLI: Show npm / yarn output during 'react-native-init' when installing React and Jest (63804db) - @mkonicek
- CLI: Remove dependency on Yeoman (8fb2440) - @mkonicek
- CLI: Use Yarn if available (ca403f0) - @mkonicek
- GitUpgrade: Upgrade React and React Native at the same time (a0f3a93) - @ncuillery
- Remove HMR require from initialization code (c3e2c30) - @davidaurelio
- Packager: Allow custom platforms on a per-project basis (5b37c3e) - @andrewimm
- Better error for ART (4a216f6) - @grabbou
- Do not call
toString
on functions in buildStyleInterpolator (25fb2ba) - @michalgr - NavigationExperimental: Update type check for NavigationCardStack (6432839) - @lgan1989
- Reworking keyboardShouldPersistTaps to have a middle ground (276485b) - @MaxLap
- Deprecate MapView in favor of airbnb/react-native-maps (5dbdb12) - @mkonicek