Skip to content

Instantly share code, notes, and snippets.

@edutrul
Created April 22, 2017 15:56
Show Gist options
  • Save edutrul/19f5286d4a13d8af69c9b3c600f2a535 to your computer and use it in GitHub Desktop.
Save edutrul/19f5286d4a13d8af69c9b3c600f2a535 to your computer and use it in GitHub Desktop.
[REACT NATIVE] Scroll down with classic loop
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