mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deploy website
Deploy website version based on aea8f19dc557dea51c5f704668375b137ca428a3
This commit is contained in:
@@ -139,18 +139,6 @@
|
||||
<p>The number passed here is a measurement unit where 1 is equivalent to your viewport height. The default value is 21 (10 viewports above, 10 below, and one in between).</p>
|
||||
<p><strong>Pros:</strong> Bigger <code>windowSize</code> will result in less chance of seeing blank space while scrolling. On the other hand, smaller <code>windowSize</code> will result in fewer items mounted simultaneously, saving memory.</p>
|
||||
<p><strong>Cons:</strong> For a bigger <code>windowSize</code>, you will have more memory consumption. For a lower <code>windowSize</code>, you will have a bigger chance of seeing blank areas.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="legacyimplementation"></a><a href="#legacyimplementation" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>legacyImplementation</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Default</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Boolean</td><td>False</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Make <code>FlatList</code> rely on the older and deprecated <code>ListView</code> instead of <code>VirtualizedList</code>.</p>
|
||||
<p><strong>Pros:</strong> No risk of seeing blank areas while scrolling. May avoid bugs in <code>VirtualizedList</code>.</p>
|
||||
<p><strong>Cons:</strong> Extra memory consumption and more app crash risk in large lists (100+) with complex items. It also warns that the above tweaks will not work because now it is using <code>ListView</code>. Many other features are not supported. There may be other bugs since <code>ListView</code> is deprecated.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="list-items"></a><a href="#list-items" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>List items</h2>
|
||||
<p>Below are some tips about list item components. They are the core of your list, so they need to be fast.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="use-basic-components"></a><a href="#use-basic-components" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Use basic components</h3>
|
||||
@@ -186,7 +174,7 @@
|
||||
<span class="token comment">// ...</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/next/performance"><span class="arrow-prev">← </span><span>Performance Overview</span></a><a class="docs-next button" href="/docs/next/ram-bundles-inline-requires"><span>RAM Bundles and Inline Requires</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#terms">Terms</a></li><li><a href="#props">Props</a><ul class="toc-headings"><li><a href="#removeclippedsubviews">removeClippedSubviews</a></li><li><a href="#maxtorenderperbatch">maxToRenderPerBatch</a></li><li><a href="#updatecellsbatchingperiod">updateCellsBatchingPeriod</a></li><li><a href="#initialnumtorender">initialNumToRender</a></li><li><a href="#windowsize">windowSize</a></li><li><a href="#legacyimplementation">legacyImplementation</a></li></ul></li><li><a href="#list-items">List items</a><ul class="toc-headings"><li><a href="#use-basic-components">Use basic components</a></li><li><a href="#use-light-components">Use light components</a></li><li><a href="#use-shouldcomponentupdate">Use shouldComponentUpdate</a></li><li><a href="#use-cached-optimized-images">Use cached optimized images</a></li><li><a href="#use-getitemlayout">Use getItemLayout</a></li><li><a href="#use-keyextractor-or-key">Use keyExtractor or key</a></li><li><a href="#avoid-anonymous-function-on-renderitem">Avoid anonymous function on renderItem</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><h5>Docs</h5><a href="/docs/getting-started">Getting Started</a><a href="/docs/tutorial">Tutorial</a><a href="/docs/components-and-apis">Components and APIs</a><a href="/docs/more-resources">More Resources</a></div><div><h5>Community</h5><a href="/help">The React Native Community</a><a href="/showcase">Who's using React Native?</a><a href="https://stackoverflow.com/questions/tagged/react-native" target="_blank">Ask Questions on Stack Overflow</a><a href="https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md">Contributor Guide</a><a href="https://dev.to/t/reactnative" target="_blank">DEV Community</a></div><div><h5>More Resources</h5><a href="/blog">Blog</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="https://reactjs.org" target="_blank">React</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2020 Facebook Inc.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/next/performance"><span class="arrow-prev">← </span><span>Performance Overview</span></a><a class="docs-next button" href="/docs/next/ram-bundles-inline-requires"><span>RAM Bundles and Inline Requires</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#terms">Terms</a></li><li><a href="#props">Props</a><ul class="toc-headings"><li><a href="#removeclippedsubviews">removeClippedSubviews</a></li><li><a href="#maxtorenderperbatch">maxToRenderPerBatch</a></li><li><a href="#updatecellsbatchingperiod">updateCellsBatchingPeriod</a></li><li><a href="#initialnumtorender">initialNumToRender</a></li><li><a href="#windowsize">windowSize</a></li></ul></li><li><a href="#list-items">List items</a><ul class="toc-headings"><li><a href="#use-basic-components">Use basic components</a></li><li><a href="#use-light-components">Use light components</a></li><li><a href="#use-shouldcomponentupdate">Use shouldComponentUpdate</a></li><li><a href="#use-cached-optimized-images">Use cached optimized images</a></li><li><a href="#use-getitemlayout">Use getItemLayout</a></li><li><a href="#use-keyextractor-or-key">Use keyExtractor or key</a></li><li><a href="#avoid-anonymous-function-on-renderitem">Avoid anonymous function on renderItem</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><h5>Docs</h5><a href="/docs/getting-started">Getting Started</a><a href="/docs/tutorial">Tutorial</a><a href="/docs/components-and-apis">Components and APIs</a><a href="/docs/more-resources">More Resources</a></div><div><h5>Community</h5><a href="/help">The React Native Community</a><a href="/showcase">Who's using React Native?</a><a href="https://stackoverflow.com/questions/tagged/react-native" target="_blank">Ask Questions on Stack Overflow</a><a href="https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md">Contributor Guide</a><a href="https://dev.to/t/reactnative" target="_blank">DEV Community</a></div><div><h5>More Resources</h5><a href="/blog">Blog</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="https://reactjs.org" target="_blank">React</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2020 Facebook Inc.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
|
||||
@@ -139,18 +139,6 @@
|
||||
<p>The number passed here is a measurement unit where 1 is equivalent to your viewport height. The default value is 21 (10 viewports above, 10 below, and one in between).</p>
|
||||
<p><strong>Pros:</strong> Bigger <code>windowSize</code> will result in less chance of seeing blank space while scrolling. On the other hand, smaller <code>windowSize</code> will result in fewer items mounted simultaneously, saving memory.</p>
|
||||
<p><strong>Cons:</strong> For a bigger <code>windowSize</code>, you will have more memory consumption. For a lower <code>windowSize</code>, you will have a bigger chance of seeing blank areas.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="legacyimplementation"></a><a href="#legacyimplementation" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>legacyImplementation</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Type</th><th>Default</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Boolean</td><td>False</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Make <code>FlatList</code> rely on the older and deprecated <code>ListView</code> instead of <code>VirtualizedList</code>.</p>
|
||||
<p><strong>Pros:</strong> No risk of seeing blank areas while scrolling. May avoid bugs in <code>VirtualizedList</code>.</p>
|
||||
<p><strong>Cons:</strong> Extra memory consumption and more app crash risk in large lists (100+) with complex items. It also warns that the above tweaks will not work because now it is using <code>ListView</code>. Many other features are not supported. There may be other bugs since <code>ListView</code> is deprecated.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="list-items"></a><a href="#list-items" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>List items</h2>
|
||||
<p>Below are some tips about list item components. They are the core of your list, so they need to be fast.</p>
|
||||
<h3><a class="anchor" aria-hidden="true" id="use-basic-components"></a><a href="#use-basic-components" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Use basic components</h3>
|
||||
@@ -186,7 +174,7 @@
|
||||
<span class="token comment">// ...</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/next/performance"><span class="arrow-prev">← </span><span>Performance Overview</span></a><a class="docs-next button" href="/docs/next/ram-bundles-inline-requires"><span>RAM Bundles and Inline Requires</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#terms">Terms</a></li><li><a href="#props">Props</a><ul class="toc-headings"><li><a href="#removeclippedsubviews">removeClippedSubviews</a></li><li><a href="#maxtorenderperbatch">maxToRenderPerBatch</a></li><li><a href="#updatecellsbatchingperiod">updateCellsBatchingPeriod</a></li><li><a href="#initialnumtorender">initialNumToRender</a></li><li><a href="#windowsize">windowSize</a></li><li><a href="#legacyimplementation">legacyImplementation</a></li></ul></li><li><a href="#list-items">List items</a><ul class="toc-headings"><li><a href="#use-basic-components">Use basic components</a></li><li><a href="#use-light-components">Use light components</a></li><li><a href="#use-shouldcomponentupdate">Use shouldComponentUpdate</a></li><li><a href="#use-cached-optimized-images">Use cached optimized images</a></li><li><a href="#use-getitemlayout">Use getItemLayout</a></li><li><a href="#use-keyextractor-or-key">Use keyExtractor or key</a></li><li><a href="#avoid-anonymous-function-on-renderitem">Avoid anonymous function on renderItem</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><h5>Docs</h5><a href="/docs/getting-started">Getting Started</a><a href="/docs/tutorial">Tutorial</a><a href="/docs/components-and-apis">Components and APIs</a><a href="/docs/more-resources">More Resources</a></div><div><h5>Community</h5><a href="/help">The React Native Community</a><a href="/showcase">Who's using React Native?</a><a href="https://stackoverflow.com/questions/tagged/react-native" target="_blank">Ask Questions on Stack Overflow</a><a href="https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md">Contributor Guide</a><a href="https://dev.to/t/reactnative" target="_blank">DEV Community</a></div><div><h5>More Resources</h5><a href="/blog">Blog</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="https://reactjs.org" target="_blank">React</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2020 Facebook Inc.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/next/performance"><span class="arrow-prev">← </span><span>Performance Overview</span></a><a class="docs-next button" href="/docs/next/ram-bundles-inline-requires"><span>RAM Bundles and Inline Requires</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#terms">Terms</a></li><li><a href="#props">Props</a><ul class="toc-headings"><li><a href="#removeclippedsubviews">removeClippedSubviews</a></li><li><a href="#maxtorenderperbatch">maxToRenderPerBatch</a></li><li><a href="#updatecellsbatchingperiod">updateCellsBatchingPeriod</a></li><li><a href="#initialnumtorender">initialNumToRender</a></li><li><a href="#windowsize">windowSize</a></li></ul></li><li><a href="#list-items">List items</a><ul class="toc-headings"><li><a href="#use-basic-components">Use basic components</a></li><li><a href="#use-light-components">Use light components</a></li><li><a href="#use-shouldcomponentupdate">Use shouldComponentUpdate</a></li><li><a href="#use-cached-optimized-images">Use cached optimized images</a></li><li><a href="#use-getitemlayout">Use getItemLayout</a></li><li><a href="#use-keyextractor-or-key">Use keyExtractor or key</a></li><li><a href="#avoid-anonymous-function-on-renderitem">Avoid anonymous function on renderItem</a></li></ul></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><div><h5>Docs</h5><a href="/docs/getting-started">Getting Started</a><a href="/docs/tutorial">Tutorial</a><a href="/docs/components-and-apis">Components and APIs</a><a href="/docs/more-resources">More Resources</a></div><div><h5>Community</h5><a href="/help">The React Native Community</a><a href="/showcase">Who's using React Native?</a><a href="https://stackoverflow.com/questions/tagged/react-native" target="_blank">Ask Questions on Stack Overflow</a><a href="https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md">Contributor Guide</a><a href="https://dev.to/t/reactnative" target="_blank">DEV Community</a></div><div><h5>More Resources</h5><a href="/blog">Blog</a><a href="https://twitter.com/reactnative" target="_blank">Twitter</a><a href="https://github.com/facebook/react-native" target="_blank">GitHub</a><a href="https://reactjs.org" target="_blank">React</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright">Copyright © 2020 Facebook Inc.</section></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>window.fbAsyncInit = function() {FB.init({appId:'1677033832619985',xfbml:true,version:'v2.7'});};(function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); js.id = id;js.src = '//connect.facebook.net/en_US/sdk.js';fjs.parentNode.insertBefore(js, fjs);}(document, 'script','facebook-jssdk'));
|
||||
</script><script>window.twttr=(function(d,s, id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src='https://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js, fjs);t._e = [];t.ready = function(f) {t._e.push(f);};return t;}(document, 'script', 'twitter-wjs'));</script><script>
|
||||
document.addEventListener('keyup', function(e) {
|
||||
if (e.target !== document.body) {
|
||||
|
||||
Reference in New Issue
Block a user