in react native example: https://github.com/facebook/react-native
var React = require('react-native');
var { ScrollView, TouchableHighlight, Text } = React;
var TouchDemo = React.createClass({
render: function() {
return (
<ScrollView>
<TouchableHighlight onPress={() => console.log('pressed')}>
<Text>Proper Touch Handling</Text>
</TouchableHighlight>
</ScrollView>
);
},
});
what is this syntax mean?
var { ScrollView, TouchableHighlight, Text } = React;
I typed it in nodejs console cause syntax error. Is this special Javascripts syntax only for React Native?
Thanks