ES6-ify ScrollView basics

Summary: Closes https://github.com/facebook/react-native/pull/8368

Differential Revision: D3477381

Pulled By: caabernathy

fbshipit-source-id: 0c43a9b8309db8f268a2776ebff2b4e52df559df
This commit is contained in:
Joel Marcey
2016-06-23 12:23:02 -07:00
committed by Facebook Github Bot 0
parent 678ea5b233
commit efb8af4e46

View File

@@ -18,10 +18,11 @@ The [`ScrollView`](/react-native/docs/scrollview.html) is a generic scrolling co
This contrived example creates a horizontal `ScrollView` with a static amount of heterogenous elements (images and text).
```ReactNativeWebPlayer
import React, { AppRegistry, ScrollView, Image, Text, View } from 'react-native'
import React, { Component } from 'react';
import{ AppRegistry, ScrollView, Image, Text, View } from 'react-native'
var SimpleScrollView = React.createClass({
render(){
class ScrollViewBasics extends Component {
render() {
return(
<ScrollView horizontal={true}>
<View>
@@ -63,8 +64,8 @@ var SimpleScrollView = React.createClass({
</ScrollView>
);
}
});
}
AppRegistry.registerComponent('AwesomeProject', () => SimpleScrollView);
AppRegistry.registerComponent('AwesomeProject', () => ScrollViewBasics);
```