mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
update website
This commit is contained in:
+1
-1
@@ -125,7 +125,7 @@
|
||||
<img src="/react-native/img/TutorialSingleFetched.png" />
|
||||
</div>
|
||||
|
||||
</span><h2><a class="anchor" name="listview"></a>ListView <a class="hash-link" href="#listview">#</a></h2><p>Let's now modify this application to render all of this data in a <code>ListView</code> component, rather than just rendering the first movie.</p><p>Why is a <code>ListView</code> better than just rendering all of these elements or putting them in a <code>ScrollView</code>? Despite React being fast, rendering a possibly infinite list of elements could be slow. <code>ListView</code> schedules rendering of views so that you only display the ones on screen and those already rendered but off screen are removed from the native view hierarchy.</p><p>First thing's first: add the <code>ListView</code> require to the top of the file.</p><div class="prism language-javascript"><span class="token keyword">var</span> <span class="token punctuation">{</span>
|
||||
</span><h2><a class="anchor" name="listview"></a>ListView <a class="hash-link" href="#listview">#</a></h2><p>Let's now modify this application to render all of this data in a <code>ListView</code> component, rather than just rendering the first movie.</p><p>Why is a <code>ListView</code> better than just rendering all of these elements or putting them in a <code>ScrollView</code>? Despite React being fast, rendering a possibly infinite list of elements could be slow. <code>ListView</code> schedules rendering of views so that you only display the ones on screen and those already rendered but off screen are removed from the native view hierarchy.</p><p>First things first: add the <code>ListView</code> require to the top of the file.</p><div class="prism language-javascript"><span class="token keyword">var</span> <span class="token punctuation">{</span>
|
||||
AppRegistry<span class="token punctuation">,</span>
|
||||
Image<span class="token punctuation">,</span>
|
||||
ListView<span class="token punctuation">,</span>
|
||||
|
||||
Reference in New Issue
Block a user