diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index eaaa2e86f..3f39492a4 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -44,6 +44,21 @@ const requireNativeComponent = require('requireNativeComponent'); * * Doesn't yet support other contained responders from blocking this scroll * view from becoming the responder. + * + * + * `` vs `` - which one to use? + * ScrollView simply renders all its react child components at once. That + * makes it very easy to understand and use. + * On the other hand, this has a performance downside. Imagine you have a very + * long list of items you want to display, worth of couple of your ScrollView’s + * heights. Creating JS components and native views upfront for all its items, + * which may not even be shown, will contribute to slow rendering of your + * screen and increased memory usage. + * + * This is where ListView comes into play. ListView renders items lazily, + * just when they are about to appear. This laziness comes at cost of a more + * complicated API, which is worth it unless you are rendering a small fixed + * set of items. */ const ScrollView = React.createClass({ propTypes: {