Where could I find the list of ES6 features taht are ready to use in React Native?
Eg Object.assign().
It's depends on what JSX done (see this table). You can use Babel for more ES6 feature, this post maybe helps.
[EDIT] According this official doc, full support table is here:
// Reserved Words:
promise.catch(function() { });
// Arrow function:
<C onPress={() => this.setState({pressed: true})}
// Call spread:
Math.max(...array);
// Class:
class C extends React.Component { render() { return <View />; }
// Destructuring:
var {isActive, style} = this.props;
// Iteration:
for (var element of array) { }
// Computed Properties:
var key = 'abc'; var obj = {[key]: 10};
// Object Consise Method:
var obj = { method() { return 10; } };
// Object Short Notation:
var name = 'vjeux'; var obj = { name };
// Rest Params:
function(type, ...args) { }
// Template:
var who = 'world'; var str = `Hello ${who}`;
// Object Spread:
var extended = { ...obj, a: 10 };
// Function Trailing Comma:
function f(a, b, c,) { }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With