Created
April 22, 2017 15:56
-
-
Save edutrul/19f5286d4a13d8af69c9b3c600f2a535 to your computer and use it in GitHub Desktop.
[REACT NATIVE] Scroll down with classic loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { AppRegistry, ScrollView, Image, Text } from 'react-native' | |
class IScrolledDownAndWhatHappenedNextShockedMe extends Component { | |
render() { | |
var rows = []; | |
for (var i = 0; i < 30; i++) { | |
rows.push(<Text style={{fontSize:1+i}}>Te amo Alexandra</Text>); | |
} | |
return ( | |
<ScrollView> | |
{rows} | |
</ScrollView> | |
); | |
} | |
} | |
AppRegistry.registerComponent( | |
'IScrolledDownAndWhatHappenedNextShockedMe', | |
() => IScrolledDownAndWhatHappenedNextShockedMe); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment