mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
48 lines
81 KiB
HTML
48 lines
81 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<meta name="generator" content="Docusaurus v2.0.0-alpha.66">
|
|
<link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="React Native Blog RSS Feed">
|
|
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="React Native Blog Atom Feed">
|
|
<link rel="preconnect" href="https://www.google-analytics.com">
|
|
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-41298772-2","auto"),ga("send","pageview")</script>
|
|
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
|
<link rel="preconnect" href="https://www.google-analytics.com">
|
|
<link rel="preconnect" href="https://www.googletagmanager.com">
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-41298772-2"></script>
|
|
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-41298772-2",{})</script>
|
|
<link rel="search" type="application/opensearchdescription+xml" title="React Native" href="/opensearch.xml">
|
|
<script src="https://cdn.jsdelivr.net/npm/focus-visible@5.0.2/dist/focus-visible.min.js" defer="defer"></script>
|
|
<script src="https://snack.expo.io/embed.js" defer="defer"></script><title data-react-helmet="true">VirtualizedList · React Native</title><meta data-react-helmet="true" property="twitter:image" content="https://reactnative.dev/img/logo-og.png"><meta data-react-helmet="true" name="twitter:image:alt" content="Image for React Native"><meta data-react-helmet="true" name="docsearch:language" content="en"><meta data-react-helmet="true" name="docsearch:version" content="0.63"><meta data-react-helmet="true" name="docsearch:docusaurus_tag" content="docs-default-0.63"><meta data-react-helmet="true" property="og:image" content="https://reactnative.dev/img/logo-og.png"><meta data-react-helmet="true" name="twitter:card" content="summary"><meta data-react-helmet="true" name="twitter:image" content="https://reactnative.dev/img/logo-og.png"><meta data-react-helmet="true" property="og:title" content="VirtualizedList · React Native"><meta data-react-helmet="true" name="description" content="Base implementation for the more convenient ` and components, which are also better documented. In general, this should only really be used if you need more flexibility than FlatList` provides, e.g. for use with immutable data instead of plain arrays."><meta data-react-helmet="true" property="og:description" content="Base implementation for the more convenient ` and components, which are also better documented. In general, this should only really be used if you need more flexibility than FlatList` provides, e.g. for use with immutable data instead of plain arrays."><meta data-react-helmet="true" property="og:url" content="https://reactnative.dev/docs/virtualizedlist"><link data-react-helmet="true" rel="shortcut icon" href="/img/favicon.ico"><link data-react-helmet="true" rel="preconnect" href="https://BH4D9OD16A-dsn.algolia.net" crossorigin="anonymous"><link data-react-helmet="true" rel="canonical" href="https://reactnative.dev/docs/virtualizedlist"><link rel="stylesheet" href="/styles.fccefeba.css">
|
|
<link rel="stylesheet" href="/main.102c4ce0.css">
|
|
<link rel="preload" href="/styles.73cf9778.js" as="script">
|
|
<link rel="preload" href="/runtime~main.a2b565db.js" as="script">
|
|
<link rel="preload" href="/main.a36c1aba.js" as="script">
|
|
<link rel="preload" href="/1.17a0cf36.js" as="script">
|
|
<link rel="preload" href="/2.37a050b1.js" as="script">
|
|
<link rel="preload" href="/1f391b9e.c148b120.js" as="script">
|
|
<link rel="preload" href="/939.41ec4d67.js" as="script">
|
|
<link rel="preload" href="/ee5b3385.90d27433.js" as="script">
|
|
<link rel="preload" href="/17896441.7d7633c0.js" as="script">
|
|
<link rel="preload" href="/7b1ca64a.4ba4907c.js" as="script">
|
|
</head>
|
|
<body>
|
|
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
|
<nav class="navbar navbar--fixed-top navbar--dark"><div class="navbar__inner"><div class="navbar__items"><div aria-label="Navigation bar toggle" class="navbar__toggle" role="button" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></div><a class="navbar__brand" href="/"><img class="navbar__logo" src="/img/header_logo.svg" alt="React Native"><strong class="navbar__title">React Native</strong></a><div class="navbar__item dropdown dropdown--hoverable dropdown--left"><a class="navbar__item navbar__link" href="/docs/getting-started">0.63</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/next/virtualizedlist">Next</a></li><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/docs/virtualizedlist">0.63</a></li><li><a class="dropdown__link" href="/docs/0.62/virtualizedlist">0.62</a></li><li><a class="dropdown__link" href="/docs/0.61/virtualizedlist">0.61</a></li><li><a class="dropdown__link" href="/docs/0.60/virtualizedlist">0.60</a></li><li><a class="dropdown__link" href="/versions">All versions</a></li></ul></div></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" href="/docs/getting-started">Docs</a><a class="navbar__item navbar__link navbar__link--active" href="/docs/components-and-apis">Components</a><a class="navbar__item navbar__link" href="/docs/accessibilityinfo">API</a><a class="navbar__item navbar__link" href="/help">Community</a><a class="navbar__item navbar__link" href="/blog">Blog</a><a href="https://github.com/facebook/react-native" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link navbar-github-link" aria-label="GitHub repository"></a><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_3lWe"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_gnXW">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_gnXW">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span><span class="DocSearch-Button-Key">⌘</span><span class="DocSearch-Button-Key">K</span></button></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/"><img class="navbar__logo" src="/img/header_logo.svg" alt="React Native"><strong class="navbar__title">React Native</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/getting-started">Docs</a></li><li class="menu__list-item"><a class="menu__link navbar__link--active" href="/docs/components-and-apis">Components</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/accessibilityinfo">API</a></li><li class="menu__list-item"><a class="menu__link" href="/help">Community</a></li><li class="menu__list-item"><a class="menu__link" href="/blog">Blog</a></li><li class="menu__list-item"><a role="button" class="menu__link menu__link--sublist">Versions</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/docs/next/virtualizedlist">Next</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active" href="/docs/virtualizedlist">0.63</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.62/virtualizedlist">0.62</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.61/virtualizedlist">0.61</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/0.60/virtualizedlist">0.60</a></li><li class="menu__list-item"><a class="menu__link" href="/versions">All versions</a></li></ul></li><li class="menu__list-item"><a href="https://github.com/facebook/react-native" target="_blank" rel="noopener noreferrer" class="menu__link navbar-github-link" aria-label="GitHub repository"></a></li></ul></div></div></div></nav><div class="main-wrapper"><div class="docPage_2UBv"><div class="docSidebarContainer_1hqR" role="complementary"><div class="sidebar_MSwm"><div class="menu menu--responsive menu_2hiu"><button aria-label="Open Menu" aria-haspopup="true" class="button button--secondary button--sm menu__button" type="button"><svg aria-label="Menu" class="sidebarMenuIcon_37TU" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 32 32" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><ul class="menu__list"><li class="menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#!">Core Components</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/components-and-apis">Core Components and APIs</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/activityindicator">ActivityIndicator</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/button">Button</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/flatlist">FlatList</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/image">Image</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/imagebackground">ImageBackground</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/keyboardavoidingview">KeyboardAvoidingView</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/modal">Modal</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/pressable">Pressable</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/refreshcontrol">RefreshControl</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/scrollview">ScrollView</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/sectionlist">SectionList</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/statusbar">StatusBar</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/switch">Switch</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/text">Text</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/textinput">TextInput</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/touchablehighlight">TouchableHighlight</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/touchableopacity">TouchableOpacity</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/touchablewithoutfeedback">TouchableWithoutFeedback</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/view">View</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active active" tabindex="0" href="/docs/virtualizedlist">VirtualizedList</a></li><li class="menu__list-item"><a class="menu__link menu__link--sublist" href="#!" tabindex="0">Android Components</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/drawerlayoutandroid">DrawerLayoutAndroid</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/touchablenativefeedback">TouchableNativeFeedback</a></li></ul></li><li class="menu__list-item"><a class="menu__link menu__link--sublist" href="#!" tabindex="0">iOS Components</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/inputaccessoryview">InputAccessoryView</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/maskedviewios">🚧 MaskedViewIOS</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/safeareaview">SafeAreaView</a></li></ul></li></ul></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">Props</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/image-style-props">Image Style Props</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/layout-props">Layout Props</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/shadow-props">Shadow Props</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/text-style-props">Text Style Props</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/view-style-props">View Style Props</a></li></ul></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">Object Types</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/pressevent">PressEvent Object Type</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/react-node">React Node Object Type</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/rect">Rect Object Type</a></li></ul></li></ul></div></div></div><main class="docMainContainer_1rYT"><div class="container padding-vert--lg docItemWrapper_1Hme"><div class="row"><div class="col docItemCol_2AGf"><div class="docItemContainer_1tAC"><article><header><h1 class="docTitle_cWlf">VirtualizedList</h1></header><div class="markdown"><p>Base implementation for the more convenient <a href="/docs/flatlist"><code><FlatList></code></a> and <a href="/docs/sectionlist"><code><SectionList></code></a> components, which are also better documented. In general, this should only really be used if you need more flexibility than <a href="/docs/flatlist"><code>FlatList</code></a> provides, e.g. for use with immutable data instead of plain arrays.</p><p>Virtualization massively improves memory consumption and performance of large lists by maintaining a finite render window of active items and replacing all items outside of the render window with appropriately sized blank space. The window adapts to scrolling behavior, and items are rendered incrementally with low-pri (after any running interactions) if they are far from the visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="example"></a>Example<a aria-hidden="true" tabindex="-1" class="hash-link" href="#example" title="Direct link to heading">#</a></h2><div class="snack-player" data-snack-name="VirtualizedListExample" data-snack-description="Example usage" data-snack-code="import%20React%20from%20'react'%3B%0Aimport%20%7B%20SafeAreaView%2C%20View%2C%20VirtualizedList%2C%20StyleSheet%2C%20Text%20%7D%20from%20'react-native'%3B%0Aimport%20Constants%20from%20'expo-constants'%3B%0A%0Aconst%20DATA%20%3D%20%5B%5D%3B%0A%0Aconst%20getItem%20%3D%20(data%2C%20index)%20%3D%3E%20%7B%0A%20%20return%20%7B%0A%20%20%20%20id%3A%20Math.random().toString(12).substring(0)%2C%0A%20%20%20%20title%3A%20%60Item%20%24%7Bindex%2B1%7D%60%0A%20%20%7D%0A%7D%0A%0Aconst%20getItemCount%20%3D%20(data)%20%3D%3E%20%7B%0A%20%20return%2050%3B%0A%7D%0A%0Aconst%20Item%20%3D%20(%7B%20title%20%7D)%3D%3E%20%7B%0A%20%20return%20(%0A%20%20%20%20%3CView%20style%3D%7Bstyles.item%7D%3E%0A%20%20%20%20%20%20%3CText%20style%3D%7Bstyles.title%7D%3E%7Btitle%7D%3C%2FText%3E%0A%20%20%20%20%3C%2FView%3E%0A%20%20)%3B%0A%7D%0A%0Aconst%20VirtualizedListExample%20%3D%20()%20%3D%3E%20%7B%0A%20%20return%20(%0A%20%20%20%20%3CSafeAreaView%20style%3D%7Bstyles.container%7D%3E%0A%20%20%20%20%20%20%3CVirtualizedList%0A%20%20%20%20%20%20%20%20data%3D%7BDATA%7D%0A%20%20%20%20%20%20%20%20initialNumToRender%3D%7B4%7D%0A%20%20%20%20%20%20%20%20renderItem%3D%7B(%7B%20item%20%7D)%20%3D%3E%20%3CItem%20title%3D%7Bitem.title%7D%20%2F%3E%7D%0A%20%20%20%20%20%20%20%20keyExtractor%3D%7Bitem%20%3D%3E%20item.key%7D%0A%20%20%20%20%20%20%20%20getItemCount%3D%7BgetItemCount%7D%0A%20%20%20%20%20%20%20%20getItem%3D%7BgetItem%7D%0A%20%20%20%20%20%20%2F%3E%0A%20%20%20%20%3C%2FSafeAreaView%3E%0A%20%20)%3B%0A%7D%0A%0Aconst%20styles%20%3D%20StyleSheet.create(%7B%0A%20%20container%3A%20%7B%0A%20%20%20%20flex%3A%201%2C%0A%20%20%20%20marginTop%3A%20Constants.statusBarHeight%2C%0A%20%20%7D%2C%0A%20%20item%3A%20%7B%0A%20%20%20%20backgroundColor%3A%20'%23f9c2ff'%2C%0A%20%20%20%20height%3A%20150%2C%0A%20%20%20%20justifyContent%3A%20'center'%2C%0A%20%20%20%20marginVertical%3A%208%2C%0A%20%20%20%20marginHorizontal%3A%2016%2C%0A%20%20%20%20padding%3A%2020%2C%0A%20%20%7D%2C%0A%20%20title%3A%20%7B%0A%20%20%20%20fontSize%3A%2032%2C%0A%20%20%7D%2C%0A%7D)%3B%0A%0Aexport%20default%20VirtualizedListExample%3B" data-snack-platform="web" data-snack-supported-platforms="ios,android,web" data-snack-theme="light" data-snack-preview="true"></div><hr><p>Some caveats:</p><ul><li>Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay.</li><li>This is a <code>PureComponent</code> which means that it will not re-render if <code>props</code> are shallow-equal. Make sure that everything your <code>renderItem</code> function depends on is passed as a prop (e.g. <code>extraData</code>) that is not <code>===</code> after updates, otherwise your UI may not update on changes. This includes the <code>data</code> prop and parent component state.</li><li>In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes.</li><li>By default, the list looks for a <code>key</code> prop on each item and uses that for the React key. Alternatively, you can provide a custom <code>keyExtractor</code> prop.</li></ul><hr><h1><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="reference"></a>Reference<a aria-hidden="true" tabindex="-1" class="hash-link" href="#reference" title="Direct link to heading">#</a></h1><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="props"></a>Props<a aria-hidden="true" tabindex="-1" class="hash-link" href="#props" title="Direct link to heading">#</a></h2><p>Inherits <a href="/docs/scrollview#props">ScrollView Props</a>.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="renderitem"></a><code>renderItem</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#renderitem" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">info</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> any</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">?</span><span class="token plain">React</span><span class="token punctuation" style="color:#657b83">.</span><span class="token plain">Element</span><span class="token tag punctuation" style="color:#657b83"><</span><span class="token tag" style="color:#fc929e">any</span><span class="token tag punctuation" style="color:#657b83">></span></div></div></div></div></div><p>Takes an item from <code>data</code> and renders it into the list</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>Yes</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="data"></a><code>data</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#data" title="Direct link to heading">#</a></h3><p>The default accessor functions assume this is an array of objects with shape <code>{key: string}</code> but you can override <code>getItem</code>, <code>getItemCount</code>, and <code>keyExtractor</code> to handle any type of index-based data.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>any</td><td>Yes</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getitem"></a><code>getItem</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getitem" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">data</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> any</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"> index</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> object</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>A generic accessor for extracting an item from any sort of data blob.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>Yes</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getitemcount"></a><code>getItemCount</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getitemcount" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">data</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> any</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> number</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Determines how many items are in the data blob.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>Yes</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="debug"></a><code>debug</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#debug" title="Direct link to heading">#</a></h3><p><code>debug</code> will turn on extra logging and visual overlays to aid with debugging both usage and implementation, but with a significant perf hit.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>boolean</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="extradata"></a><code>extraData</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#extradata" title="Direct link to heading">#</a></h3><p>A marker property for telling the list to re-render (since it implements <code>PureComponent</code>). If any of your <code>renderItem</code>, Header, Footer, etc. functions depend on anything outside of the <code>data</code> prop, stick it here and treat it immutably.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>any</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getitemlayout"></a><code>getItemLayout</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getitemlayout" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"> </span><span class="token parameter">data</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> any</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> index</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">{</span><span class="token plain">length</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> offset</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#657b83">,</span><span class="token plain"> index</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> number</span><span class="token punctuation" style="color:#657b83">}</span></div></div></div></div></div><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="initialscrollindex"></a><code>initialScrollIndex</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#initialscrollindex" title="Direct link to heading">#</a></h3><p>Instead of starting at the top with the first item, start at <code>initialScrollIndex</code>. This disables the "scroll to top" optimization that keeps the first <code>initialNumToRender</code> items always rendered and immediately renders the items starting at this initial index. Requires <code>getItemLayout</code> to be implemented.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>number</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="inverted"></a><code>inverted</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#inverted" title="Direct link to heading">#</a></h3><p>Reverses the direction of scroll. Uses scale transforms of -1.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>boolean</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="cellrenderercomponent"></a><code>CellRendererComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#cellrenderercomponent" title="Direct link to heading">#</a></h3><p>Each cell is rendered using this element. Can be a React Component Class,or a render function. Defaults to using <a href="/docs/view"><code>View</code></a>.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>component, function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="itemseparatorcomponent"></a><code>ItemSeparatorComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#itemseparatorcomponent" title="Direct link to heading">#</a></h3><p>Rendered in between each item, but not at the top or bottom. By default, <code>highlighted</code> and <code>leadingItem</code> props are provided. <code>renderItem</code> provides <code>separators.highlight</code>/<code>unhighlight</code> which will update the <code>highlighted</code> prop, but you can also add custom props with <code>separators.updateProps</code>.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>component, function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listkey"></a><code>listKey</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listkey" title="Direct link to heading">#</a></h3><p>A unique identifier for this list. If there are multiple VirtualizedLists at the same level of nesting within another VirtualizedList, this key is necessary for virtualization to work properly.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>string</td><td>True</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listemptycomponent"></a><code>ListEmptyComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listemptycomponent" title="Direct link to heading">#</a></h3><p>Rendered when the list is empty. Can be a React Component Class, a render function, or a rendered element.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>component, function, element</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listitemcomponent"></a><code>ListItemComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listitemcomponent" title="Direct link to heading">#</a></h3><p>Each data item is rendered using this element. Can be a React Component Class, or a render function</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>component, function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listfootercomponent"></a><code>ListFooterComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listfootercomponent" title="Direct link to heading">#</a></h3><p>Rendered at the bottom of all the items. Can be a React Component Class, a render function, or a rendered element.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>component, function, element</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listfootercomponentstyle"></a><code>ListFooterComponentStyle</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listfootercomponentstyle" title="Direct link to heading">#</a></h3><p>Styling for internal View for ListFooterComponent</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>ViewStyleProp</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listheadercomponent"></a><code>ListHeaderComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listheadercomponent" title="Direct link to heading">#</a></h3><p>Rendered at the top of all the items. Can be a React Component Class, a render function, or a rendered element.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>component, function, element</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="listheadercomponentstyle"></a><code>ListHeaderComponentStyle</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#listheadercomponentstyle" title="Direct link to heading">#</a></h3><p>Styling for internal View for ListHeaderComponent</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>ViewStyleProp</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="onrefresh"></a><code>onRefresh</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#onrefresh" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">void</span></div></div></div></div></div><p>If provided, a standard <code>RefreshControl</code> will be added for "Pull to Refresh" functionality. Make sure to also set the <code>refreshing</code> prop correctly.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="onscrolltoindexfailed"></a><code>onScrollToIndexFailed</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#onscrolltoindexfailed" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">info</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> </span><span class="token parameter punctuation" style="color:#657b83">{</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> index</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> highestMeasuredFrameIndex</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> averageItemLength</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> </span><span class="token parameter punctuation" style="color:#657b83">}</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">void</span></div></div></div></div></div><p>Used to handle failures when scrolling to an index that has not been measured yet. Recommended action is to either compute your own offset and <code>scrollTo</code> it, or scroll as far as possible and then try again after more items have been rendered.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="onviewableitemschanged"></a><code>onViewableItemsChanged</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#onviewableitemschanged" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">info</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> </span><span class="token parameter punctuation" style="color:#657b83">{</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> viewableItems</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> array</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> changed</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> array</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token parameter"> </span><span class="token parameter punctuation" style="color:#657b83">}</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">void</span></div></div></div></div></div><p>Called when the viewability of rows changes, as defined by the <code>viewabilityConfig</code> prop.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="refreshing"></a><code>refreshing</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#refreshing" title="Direct link to heading">#</a></h3><p>Set this true while waiting for new data from a refresh.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>boolean</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="refreshcontrol"></a><code>refreshControl</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#refreshcontrol" title="Direct link to heading">#</a></h3><p>A custom refresh control element. When set, it overrides the default <code><RefreshControl></code>component built internally. The onRefresh and refreshing props are also ignored. Only works for vertical VirtualizedList.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>element</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="removeclippedsubviews"></a><code>removeClippedSubviews</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#removeclippedsubviews" title="Direct link to heading">#</a></h3><p>This may improve scroll performance for large lists.</p><blockquote><p>Note: May have bugs (missing content) in some circumstances - use at your own risk.</p></blockquote><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>boolean</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="renderscrollcomponent"></a><code>renderScrollComponent</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#renderscrollcomponent" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">props</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> object</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> element</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Render a custom scroll component, e.g. with a differently styled <code>RefreshControl</code>.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="viewabilityconfig"></a><code>viewabilityConfig</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#viewabilityconfig" title="Direct link to heading">#</a></h3><p>See <code>ViewabilityHelper.js</code> for flow type and further documentation.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>ViewabilityConfig</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="viewabilityconfigcallbackpairs"></a><code>viewabilityConfigCallbackPairs</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#viewabilityconfigcallbackpairs" title="Direct link to heading">#</a></h3><p>List of <code>ViewabilityConfig</code>/<code>onViewableItemsChanged</code> pairs. A specific <code>onViewableItemsChanged</code> will be called when its corresponding <code>ViewabilityConfig</code>'s conditions are met. See <code>ViewabilityHelper.js</code> for flow type and further documentation.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>array of ViewabilityConfigCallbackPair</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="horizontal"></a><code>horizontal</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#horizontal" title="Direct link to heading">#</a></h3><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>boolean</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="initialnumtorender"></a><code>initialNumToRender</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#initialnumtorender" title="Direct link to heading">#</a></h3><p>How many items to render in the initial batch. This should be enough to fill the screen but not much more. Note these items will never be unmounted as part of the windowed rendering in order to improve perceived performance of scroll-to-top actions.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>number</td><td>Yes</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="keyextractor"></a><code>keyExtractor</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#keyextractor" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">item</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> object</span><span class="token parameter punctuation" style="color:#657b83">,</span><span class="token parameter"> index</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> string</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Used to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checks <code>item.key</code>, then falls back to using the index, like React does.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="maxtorenderperbatch"></a><code>maxToRenderPerBatch</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#maxtorenderperbatch" title="Direct link to heading">#</a></h3><p>The maximum number of items to render in each incremental render batch. The more rendered at once, the better the fill rate, but responsiveness may suffer because rendering content may interfere with responding to button taps or other interactions.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>number</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="onendreached"></a><code>onEndReached</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#onendreached" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token punctuation" style="color:#657b83">(</span><span class="token parameter">info</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> </span><span class="token parameter punctuation" style="color:#657b83">{</span><span class="token parameter">distanceFromEnd</span><span class="token parameter punctuation" style="color:#657b83">:</span><span class="token parameter"> number</span><span class="token parameter punctuation" style="color:#657b83">}</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token keyword" style="color:#c5a5c5">void</span></div></div></div></div></div><p>Called once when the scroll position gets within <code>onEndReachedThreshold</code> of the rendered content.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>function</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="onendreachedthreshold"></a><code>onEndReachedThreshold</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#onendreachedthreshold" title="Direct link to heading">#</a></h3><p>How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the <code>onEndReached</code> callback. Thus a value of 0.5 will trigger <code>onEndReached</code> when the end of the content is within half the visible length of the list.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>number</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="updatecellsbatchingperiod"></a><code>updateCellsBatchingPeriod</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#updatecellsbatchingperiod" title="Direct link to heading">#</a></h3><p>Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off screen. Similar fill rate/responsiveness tradeoff as <code>maxToRenderPerBatch</code>.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>number</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="windowsize"></a><code>windowSize</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#windowsize" title="Direct link to heading">#</a></h3><p>Determines the maximum number of items rendered outside of the visible area, in units of visible lengths. So if your list fills the screen, then <code>windowSize={21}</code> (the default) will render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing this number will reduce memory consumption and may improve performance, but will increase the chance that fast scrolling may reveal momentary blank areas of unrendered content.</p><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>number</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="disablevirtualization"></a><code>disableVirtualization</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#disablevirtualization" title="Direct link to heading">#</a></h3><blockquote><p><strong>Deprecated.</strong> Virtualization provides significant performance and memory optimizations, but fully unmounts react instances that are outside of the render window. You should only need to disable this for debugging purposes.</p></blockquote><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td></td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="persistentscrollbar"></a><code>persistentScrollbar</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#persistentscrollbar" title="Direct link to heading">#</a></h3><table><thead><tr><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>bool</td><td>No</td></tr></tbody></table><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="progressviewoffset"></a><code>progressViewOffset</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#progressviewoffset" title="Direct link to heading">#</a></h3><p>Set this when offset is needed for the loading indicator to show correctly.</p><table><thead><tr><th>Type</th><th>Required</th><th>Platform</th></tr></thead><tbody><tr><td>number</td><td>No</td><td>Android</td></tr></tbody></table><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="methods"></a>Methods<a aria-hidden="true" tabindex="-1" class="hash-link" href="#methods" title="Direct link to heading">#</a></h2><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="scrolltoend"></a><code>scrollToEnd()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#scrolltoend" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">scrollToEnd</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">params</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> object</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain" style="display:inline-block">
|
|
</span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain">Valid </span><span class="token template-string template-punctuation string" style="color:#8dc891">`</span><span class="token template-string string" style="color:#8dc891">params</span><span class="token template-string template-punctuation string" style="color:#8dc891">`</span><span class="token plain"> consist </span><span class="token keyword" style="color:#c5a5c5">of</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain" style="display:inline-block">
|
|
</span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"></span><span class="token operator" style="color:#fc929e">-</span><span class="token plain"> </span><span class="token string" style="color:#8dc891">'animated'</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">boolean</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">.</span><span class="token plain"> Optional </span><span class="token keyword" style="color:#c5a5c5">default</span><span class="token plain"> is </span><span class="token boolean" style="color:#ff8b50">true</span><span class="token punctuation" style="color:#657b83">.</span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain" style="display:inline-block">
|
|
</span></div></div></div></div></div><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="scrolltoindex"></a><code>scrollToIndex()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#scrolltoindex" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">scrollToIndex</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">params</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> object</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Valid <code>params</code> consist of:</p><ul><li>'animated' (boolean). Optional.</li><li>'index' (number). Required.</li><li>'viewOffset' (number). Optional.</li><li>'viewPosition' (number). Optional.</li></ul><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="scrolltoitem"></a><code>scrollToItem()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#scrolltoitem" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">scrollToItem</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">params</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> object</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Valid <code>params</code> consist of:</p><ul><li>'animated' (boolean). Optional.</li><li>'item' (Item). Required.</li><li>'viewPosition' (number). Optional.</li></ul><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="scrolltooffset"></a><code>scrollToOffset()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#scrolltooffset" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">scrollToOffset</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">params</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> object</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Scroll to a specific content pixel offset in the list.</p><p>Param <code>offset</code> expects the offset to scroll to. In case of <code>horizontal</code> is true, the offset is the x-value, in any other case the offset is the y-value.</p><p>Param <code>animated</code> (<code>true</code> by default) defines whether the list should do an animation while scrolling.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="recordinteraction"></a><code>recordInteraction()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#recordinteraction" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">recordInteraction</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="flashscrollindicators"></a><code>flashScrollIndicators()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#flashscrollindicators" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">flashScrollIndicators</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getscrollresponder"></a><code>getScrollResponder()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getscrollresponder" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">getScrollResponder</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">?</span><span class="token plain">ScrollResponderType</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>Provides a handle to the underlying scroll responder. Note that <code>this._scrollRef</code> might not be a <code>ScrollView</code>, so we need to check that it responds to <code>getScrollResponder</code> before calling it.</p><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getscrollablenode"></a><code>getScrollableNode()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getscrollablenode" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">getScrollableNode</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">?</span><span class="token plain">number</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getscrollref"></a><code>getScrollRef()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getscrollref" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">getScrollRef</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">|</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">?</span><span class="token plain">React</span><span class="token punctuation" style="color:#657b83">.</span><span class="token plain">ElementRef</span><span class="token tag punctuation" style="color:#657b83"><</span><span class="token tag" style="color:#fc929e">typeof</span><span class="token tag" style="color:#fc929e"> </span><span class="token tag attr-name" style="color:#c5a5c5">ScrollView</span><span class="token tag punctuation" style="color:#657b83">></span><span class="token plain"></span></div><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token plain"> </span><span class="token operator" style="color:#fc929e">|</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">?</span><span class="token plain">React</span><span class="token punctuation" style="color:#657b83">.</span><span class="token plain">ElementRef</span><span class="token tag punctuation" style="color:#657b83"><</span><span class="token tag" style="color:#fc929e">typeof</span><span class="token tag" style="color:#fc929e"> </span><span class="token tag attr-name" style="color:#c5a5c5">View</span><span class="token tag punctuation" style="color:#657b83">></span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="setnativeprops"></a><code>setNativeProps()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#setnativeprops" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">setNativeProps</span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">(</span><span class="token plain">props</span><span class="token punctuation" style="color:#657b83">:</span><span class="token plain"> Object</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">)</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="getchildcontext"></a><code>getChildContext()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#getchildcontext" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">getChildContext</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> Object</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div><p>The <code>Object</code> returned consist of:</p><ul><li>'virtualizedList' (Object). This object consist of the following<ul><li>getScrollMetrics' (Function). Returns an object with following properties: <code>{ contentLength: number, dOffset: number, dt: number, offset: number, timestamp: number, velocity: number, visibleLength: number }</code>.</li><li>'horizontal' (boolean) - Optional.</li><li>'getOutermostParentListRef' (Function).</li><li>'getNestedChildState' (Function) - Returns ChildListState .</li><li>'registerAsNestedChild' (Function). This accept an object with following properties <code>{ cellKey: string, key: string, ref: VirtualizedList, parentDebugInfo: ListDebugInfo }</code>. It returns a ChildListState</li><li>'unregisterAsNestedChild' (Function). This takes an object with following properties, <code>{ key: string, state: ChildListState }</code></li><li>'debugInfo' (ListDebugInfo).</li></ul></li></ul><hr><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_3pqN" id="hasmore"></a><code>hasMore()</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#hasmore" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_xYIz"><div class="codeBlockContent_rlEb"><button tabindex="0" type="button" aria-label="Copy code to clipboard" class="copyButton_kOW4">Copy</button><div class="prism-code language-jsx codeBlock_1AP7"><div class="codeBlockLines_1boI" style="color:#FFFFFF;background:#282C34"><div class="token-line" style="color:#FFFFFF;background:#282C34"><span class="token function" style="color:#79b6f2">hasMore</span><span class="token plain"> </span><span class="token punctuation" style="color:#657b83">(</span><span class="token punctuation" style="color:#657b83">)</span><span class="token plain"> </span><span class="token operator" style="color:#fc929e">=></span><span class="token plain"> boolean</span><span class="token punctuation" style="color:#657b83">;</span></div></div></div></div></div></div></article><div class="docMetadata margin-vert--xl"><div class="row"><div class="col"><a href="https://github.com/facebook/react-native-website/blob/master/website/versioned_docs/version-0.63/virtualizedlist.md" target="_blank" rel="noreferrer noopener"><svg fill="currentColor" height="1.2em" width="1.2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 40 40" style="margin-right:0.3em;vertical-align:sub"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col text--right"><em><small class="docMetadata-updated">Last updated on <time datetime="2020-10-29T04:19:29.000Z" class="docLastUpdatedAt_1gIo">10/29/2020</time></small></em></div></div></div><div class="margin-vert--lg"><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/view"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« View</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/drawerlayoutandroid"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">DrawerLayoutAndroid »</div></a></div></nav></div></div></div><div class="col col--3"><div class="tableOfContents_3iuQ"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#example" class="table-of-contents__link">Example</a></li><li><a href="#props" class="table-of-contents__link">Props</a><ul><li><a href="#renderitem" class="table-of-contents__link"><code>renderItem</code></a></li><li><a href="#data" class="table-of-contents__link"><code>data</code></a></li><li><a href="#getitem" class="table-of-contents__link"><code>getItem</code></a></li><li><a href="#getitemcount" class="table-of-contents__link"><code>getItemCount</code></a></li><li><a href="#debug" class="table-of-contents__link"><code>debug</code></a></li><li><a href="#extradata" class="table-of-contents__link"><code>extraData</code></a></li><li><a href="#getitemlayout" class="table-of-contents__link"><code>getItemLayout</code></a></li><li><a href="#initialscrollindex" class="table-of-contents__link"><code>initialScrollIndex</code></a></li><li><a href="#inverted" class="table-of-contents__link"><code>inverted</code></a></li><li><a href="#cellrenderercomponent" class="table-of-contents__link"><code>CellRendererComponent</code></a></li><li><a href="#itemseparatorcomponent" class="table-of-contents__link"><code>ItemSeparatorComponent</code></a></li><li><a href="#listkey" class="table-of-contents__link"><code>listKey</code></a></li><li><a href="#listemptycomponent" class="table-of-contents__link"><code>ListEmptyComponent</code></a></li><li><a href="#listitemcomponent" class="table-of-contents__link"><code>ListItemComponent</code></a></li><li><a href="#listfootercomponent" class="table-of-contents__link"><code>ListFooterComponent</code></a></li><li><a href="#listfootercomponentstyle" class="table-of-contents__link"><code>ListFooterComponentStyle</code></a></li><li><a href="#listheadercomponent" class="table-of-contents__link"><code>ListHeaderComponent</code></a></li><li><a href="#listheadercomponentstyle" class="table-of-contents__link"><code>ListHeaderComponentStyle</code></a></li><li><a href="#onrefresh" class="table-of-contents__link"><code>onRefresh</code></a></li><li><a href="#onscrolltoindexfailed" class="table-of-contents__link"><code>onScrollToIndexFailed</code></a></li><li><a href="#onviewableitemschanged" class="table-of-contents__link"><code>onViewableItemsChanged</code></a></li><li><a href="#refreshing" class="table-of-contents__link"><code>refreshing</code></a></li><li><a href="#refreshcontrol" class="table-of-contents__link"><code>refreshControl</code></a></li><li><a href="#removeclippedsubviews" class="table-of-contents__link"><code>removeClippedSubviews</code></a></li><li><a href="#renderscrollcomponent" class="table-of-contents__link"><code>renderScrollComponent</code></a></li><li><a href="#viewabilityconfig" class="table-of-contents__link"><code>viewabilityConfig</code></a></li><li><a href="#viewabilityconfigcallbackpairs" class="table-of-contents__link"><code>viewabilityConfigCallbackPairs</code></a></li><li><a href="#horizontal" class="table-of-contents__link"><code>horizontal</code></a></li><li><a href="#initialnumtorender" class="table-of-contents__link"><code>initialNumToRender</code></a></li><li><a href="#keyextractor" class="table-of-contents__link"><code>keyExtractor</code></a></li><li><a href="#maxtorenderperbatch" class="table-of-contents__link"><code>maxToRenderPerBatch</code></a></li><li><a href="#onendreached" class="table-of-contents__link"><code>onEndReached</code></a></li><li><a href="#onendreachedthreshold" class="table-of-contents__link"><code>onEndReachedThreshold</code></a></li><li><a href="#updatecellsbatchingperiod" class="table-of-contents__link"><code>updateCellsBatchingPeriod</code></a></li><li><a href="#windowsize" class="table-of-contents__link"><code>windowSize</code></a></li><li><a href="#disablevirtualization" class="table-of-contents__link"><code>disableVirtualization</code></a></li><li><a href="#persistentscrollbar" class="table-of-contents__link"><code>persistentScrollbar</code></a></li><li><a href="#progressviewoffset" class="table-of-contents__link"><code>progressViewOffset</code></a></li></ul></li><li><a href="#methods" class="table-of-contents__link">Methods</a><ul><li><a href="#scrolltoend" class="table-of-contents__link"><code>scrollToEnd()</code></a></li><li><a href="#scrolltoindex" class="table-of-contents__link"><code>scrollToIndex()</code></a></li><li><a href="#scrolltoitem" class="table-of-contents__link"><code>scrollToItem()</code></a></li><li><a href="#scrolltooffset" class="table-of-contents__link"><code>scrollToOffset()</code></a></li><li><a href="#recordinteraction" class="table-of-contents__link"><code>recordInteraction()</code></a></li><li><a href="#flashscrollindicators" class="table-of-contents__link"><code>flashScrollIndicators()</code></a></li><li><a href="#getscrollresponder" class="table-of-contents__link"><code>getScrollResponder()</code></a></li><li><a href="#getscrollablenode" class="table-of-contents__link"><code>getScrollableNode()</code></a></li><li><a href="#getscrollref" class="table-of-contents__link"><code>getScrollRef()</code></a></li><li><a href="#setnativeprops" class="table-of-contents__link"><code>setNativeProps()</code></a></li><li><a href="#getchildcontext" class="table-of-contents__link"><code>getChildContext()</code></a></li><li><a href="#hasmore" class="table-of-contents__link"><code>hasMore()</code></a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">Docs</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/getting-started">Getting Started</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/tutorial">Tutorial</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/components-and-apis">Components and APIs</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/more-resources">More Resources</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">Community</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/help">The React Native Community</a></li><li class="footer__item"><a class="footer__link-item" href="/showcase">Who's using React Native?</a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/react-native" target="_blank" rel="noopener noreferrer" class="footer__link-item">Ask Questions on Stack Overflow</a></li><li class="footer__item"><a href="https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contributor Guide</a></li><li class="footer__item"><a href="https://dev.to/t/reactnative" target="_blank" rel="noopener noreferrer" class="footer__link-item">DEV Community</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">Find us</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://twitter.com/reactnative" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter</a></li><li class="footer__item"><a href="https://github.com/facebook/react-native" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">More</h4><ul class="footer__items"><li class="footer__item"><a href="https://reactjs.org/" target="_blank" rel="noopener noreferrer" class="footer__link-item">React</a></li><li class="footer__item"><a href="https://opensource.facebook.com/legal/privacy" target="_blank" rel="noopener noreferrer" class="footer__link-item">Privacy Policy</a></li><li class="footer__item"><a href="https://opensource.facebook.com/legal/terms" target="_blank" rel="noopener noreferrer" class="footer__link-item">Terms of Service</a></li></ul></div></div><div class="text--center"><div class="margin-bottom--sm"><a href="https://opensource.facebook.com" target="_blank" rel="noopener noreferrer" class="footerLogoLink_19Ac"><img class="footer__logo" alt="Facebook Open Source Logo" src="/img/oss_logo.png"></a></div><div>Copyright © 2020 Facebook, Inc.</div></div></div></footer></div>
|
|
<script src="/styles.73cf9778.js"></script>
|
|
<script src="/runtime~main.a2b565db.js"></script>
|
|
<script src="/main.a36c1aba.js"></script>
|
|
<script src="/1.17a0cf36.js"></script>
|
|
<script src="/2.37a050b1.js"></script>
|
|
<script src="/1f391b9e.c148b120.js"></script>
|
|
<script src="/939.41ec4d67.js"></script>
|
|
<script src="/ee5b3385.90d27433.js"></script>
|
|
<script src="/17896441.7d7633c0.js"></script>
|
|
<script src="/7b1ca64a.4ba4907c.js"></script>
|
|
</body>
|
|
</html> |