mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-30 22:48:23 +08:00
[Async] Enable async/await and update UIExplorer and tests
Summary: - Enables async/await in .babelrc and transformer.js - Adds regenerator to package.json. Users still need to explicitly require the regenerator runtime -- this is so that you only pay for what you use. - Update AsyncStorage examples in UIExplorer to use async/await - Update promise tests in UIExplorer to use async/await in addition to the promise API Closes https://github.com/facebook/react-native/pull/1765 Github Author: James Ide <ide@jameside.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
require('RCTDebugComponentOwnership');
|
||||
require('RCTDeviceEventEmitter');
|
||||
require('PerformanceLogger');
|
||||
require('regenerator/runtime');
|
||||
|
||||
if (typeof GLOBAL === 'undefined') {
|
||||
GLOBAL = this;
|
||||
|
||||
Reference in New Issue
Block a user