From a57aed3afe43e5fa06106091db0035169bac4e4f Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Tue, 13 Jun 2017 06:16:47 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/flatlist.html | 8 +++++--- releases/next/docs/sectionlist.html | 2 +- releases/next/docs/virtualizedlist.html | 10 ++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/releases/next/docs/flatlist.html b/releases/next/docs/flatlist.html index 0436bd7895d..88fafc5e7ba 100644 --- a/releases/next/docs/flatlist.html +++ b/releases/next/docs/flatlist.html @@ -74,8 +74,10 @@ a rendered element.

columnWrapperStyle?: StyleObj #

Optional custom style for multi-item rows generated when numColumns > 1.

data: ?$ReadOnlyArray<ItemT> #

For simplicity, data is just a plain array. If you want to use something else, like an immutable list, use the underlying VirtualizedList directly.

extraData?: any #

A marker property for telling the list to re-render (since it implements PureComponent). If any of your renderItem, Header, Footer, etc. functions depend on anything outside of the -data prop, stick it here and treat it immutably.

getItemLayout?: (data: ?Array<ItemT>, index: number) => - {length: number, offset: number, index: number} #

getItemLayout is an optional optimizations that let us skip measurement of dynamic content if +data prop, stick it here and treat it immutably.

getItemLayout?: ( + data: ?Array<ItemT>, + index: number, +) => {length: number, offset: number, index: number} #

getItemLayout is an optional optimizations that let us skip measurement of dynamic content if you know the height of items a priori. getItemLayout is the most efficient, and is easy to use if you have fixed height items, for example:

getItemLayout={(data, index) => ( {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index} @@ -85,7 +87,7 @@ much more. Note these items will never be unmounted as part of the windowed rend to improve perceived performance of scroll-to-top actions.

initialScrollIndex?: ?number #

Instead of starting at the top with the first item, start at initialScrollIndex. This disables the "scroll to top" optimization that keeps the first initialNumToRender items always rendered and immediately renders the items starting at this initial index. Requires -getItemLayout to be implemented.

keyExtractor: (item: ItemT, index: number) => string #

Used to extract a unique key for a given item at the specified index. Key is used for caching +getItemLayout to be implemented.

inverted?: ?boolean #

Reverses the direction of scroll. Uses scale transforms of -1.

keyExtractor: (item: ItemT, index: number) => string #

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 item.key, then falls back to using the index, like React does.

legacyImplementation?: ?boolean #

numColumns: number #

Multiple columns can only be rendered with horizontal={false} and will zig-zag like a flexWrap layout. Items should all be the same height - masonry layouts are not supported.

onEndReached?: ?(info: {distanceFromEnd: number}) => void #

Called once when the scroll position gets within onEndReachedThreshold of the rendered diff --git a/releases/next/docs/sectionlist.html b/releases/next/docs/sectionlist.html index 628cae50d5d..8ae3d506c54 100644 --- a/releases/next/docs/sectionlist.html +++ b/releases/next/docs/sectionlist.html @@ -39,7 +39,7 @@ and any custom props from separators.updateProps.

renderItem, Header, Footer, etc. functions depend on anything outside of the data prop, stick it here and treat it immutably.

initialNumToRender: number #

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.

keyExtractor: (item: Item, index: number) => string #

Used to extract a unique key for a given item at the specified index. Key is used for caching +to improve perceived performance of scroll-to-top actions.

inverted?: ?boolean #

Reverses the direction of scroll. Uses scale transforms of -1.

keyExtractor: (item: Item, index: number) => string #

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 item.key, then falls back to using the index, like react does.

legacyImplementation?: ?boolean #

onEndReached?: ?(info: {distanceFromEnd: number}) => void #

Called once when the scroll position gets within onEndReachedThreshold of the rendered content.

onEndReachedThreshold?: ?number #

How far from the end (in units of visible length of the list) the bottom edge of the diff --git a/releases/next/docs/virtualizedlist.html b/releases/next/docs/virtualizedlist.html index 225ab76b231..ef98066950e 100644 --- a/releases/next/docs/virtualizedlist.html +++ b/releases/next/docs/virtualizedlist.html @@ -22,20 +22,22 @@ implementation, but with a significant perf hit.

extraData?: any #

A marker property for telling the list to re-render (since it implements PureComponent). If any of your renderItem, Header, Footer, etc. functions depend on anything outside of the -data prop, stick it here and treat it immutably.

getItem: (data: any, index: number) => ?Item #

A generic accessor for extracting an item from any sort of data blob.

getItemCount: (data: any) => number #

Determines how many items are in the data blob.

getItemLayout?: (data: any, index: number) => - {length: number, offset: number, index: number} #

horizontal?: ?boolean #

initialNumToRender: number #

How many items to render in the initial batch. This should be enough to fill the screen but not +data prop, stick it here and treat it immutably.

getItem: (data: any, index: number) => ?Item #

A generic accessor for extracting an item from any sort of data blob.

getItemCount: (data: any) => number #

Determines how many items are in the data blob.

getItemLayout?: ( + data: any, + index: number, +) => {length: number, offset: number, index: number} #

horizontal?: ?boolean #

initialNumToRender: number #

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.

initialScrollIndex?: ?number #

Instead of starting at the top with the first item, start at initialScrollIndex. This disables the "scroll to top" optimization that keeps the first initialNumToRender items always rendered and immediately renders the items starting at this initial index. Requires -getItemLayout to be implemented.

keyExtractor: (item: Item, index: number) => string #

maxToRenderPerBatch: number #

The maximum number of items to render in each incremental render batch. The more rendered at +getItemLayout to be implemented.

inverted?: ?boolean #

Reverses the direction of scroll. Uses scale transforms of -1.

keyExtractor: (item: Item, index: number) => string #

maxToRenderPerBatch: number #

The maximum number of items to render in each incremental render batch. The more rendered at once, the better the fill rate, but responsiveness my suffer because rendering content may interfere with responding to button taps or other interactions.

onEndReached?: ?(info: {distanceFromEnd: number}) => void #

onEndReachedThreshold?: ?number #

onLayout?: ?Function #

onRefresh?: ?Function #

If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly.

onViewableItemsChanged?: ?(info: { viewableItems: Array<ViewToken>, changed: Array<ViewToken>, }) => void #

Called when the viewability of rows changes, as defined by the -viewabilityConfig prop.

refreshing?: ?boolean #

Set this true while waiting for new data from a refresh.

removeClippedSubviews?: boolean #

Note: may have bugs (missing content) in some circumstances - use at your own risk.

This may improve scroll performance for large lists.

renderItem: (info: any) => ?React.Element<any> #

renderScrollComponent: (props: Object) => React.Element<any> #

Render a custom scroll component, e.g. with a differently styled RefreshControl.

scrollEventThrottle?: #

updateCellsBatchingPeriod: number #

Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off +viewabilityConfig prop.

refreshing?: ?boolean #

Set this true while waiting for new data from a refresh.

removeClippedSubviews?: boolean #

Note: may have bugs (missing content) in some circumstances - use at your own risk.

This may improve scroll performance for large lists.

renderItem: (info: any) => ?React.Element<any> #

renderScrollComponent?: (props: Object) => React.Element<any> #

Render a custom scroll component, e.g. with a differently styled RefreshControl.

scrollEventThrottle?: #

updateCellsBatchingPeriod: number #

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 maxToRenderPerBatch.

viewabilityConfig?: ViewabilityConfig #

windowSize: number #

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 windowSize={21} (the default) will render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing