mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-19 13:08:11 +08:00
Codemod import React from 'react-native'
Reviewed By: spicyj Differential Revision: D3223162 fb-gh-sync-id: 0b1af846afe17cdf8b2c2ca7f31f1197cde752c0 fbshipit-source-id: 0b1af846afe17cdf8b2c2ca7f31f1197cde752c0
This commit is contained in:
committed by
Facebook Github Bot 7
parent
8e43b24a36
commit
6f43d1f2cb
@@ -37,7 +37,7 @@ ES6
|
||||
* [Constants](https://babeljs.io/docs/learn-es2015/#let-const): `const answer = 42;`
|
||||
* [Destructuring](http://babeljs.io/docs/learn-es2015/#destructuring): `var {isActive, style} = this.props;`
|
||||
* [for...of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of): `for (var num of [1, 2, 3]) {}`
|
||||
* [Modules](http://babeljs.io/docs/learn-es2015/#modules): `import React, { Component } from 'react-native';`
|
||||
* [Modules](http://babeljs.io/docs/learn-es2015/#modules): `import { Component } from 'react-native';`
|
||||
* [Computed Properties](http://babeljs.io/docs/learn-es2015/#enhanced-object-literals): `var key = 'abc'; var obj = {[key]: 10};`
|
||||
* Object Consise Method: `var obj = { method() { return 10; } };`
|
||||
* [Object Short Notation](http://babeljs.io/docs/learn-es2015/#enhanced-object-literals): `var name = 'vjeux'; var obj = { name };`
|
||||
|
||||
Reference in New Issue
Block a user