diff --git a/releases/next/css/react-native.css b/releases/next/css/react-native.css index 7ff24fb0a42..e65b0ad02fd 100644 --- a/releases/next/css/react-native.css +++ b/releases/next/css/react-native.css @@ -1048,7 +1048,7 @@ h2 { display: table-cell; } p { - margin: 10px 0; } + margin: 16px 0; } .highlight { padding: 10px; @@ -1668,6 +1668,14 @@ input#algolia-doc-search:focus { font-size: 24px; text-align: center; } +@media only screen and (max-width: 680px) { + .hero .text { + font-size: 200%; + text-align: center; } + .hero .minitext { + font-size: 18px; + text-align: center; } } + .buttons-unit { margin-top: 40px; text-align: center; } @@ -1676,10 +1684,14 @@ input#algolia-doc-search:focus { color: #FA6900; } .buttons-unit .button { - font-size: 24px; background: #05A5D1; color: #fafafa; } +@media screen and (min-width: 600px) { + .buttons-unit .button { + font-size: 24px; } +} + .buttons-unit .button:active { background: #0485A9; } @@ -1712,15 +1724,11 @@ input#algolia-doc-search:focus { .showcase { margin: 30px auto 30px auto; - width: 100%; + width: 50%; display: inline-block; text-align: center; vertical-align: top; } -@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) { - .showcase { - width: 50%; } } - @media only screen and (min-device-width: 1024px) { .showcase { width: 25%; } } @@ -1832,6 +1840,10 @@ input#algolia-doc-search:focus { display: block; text-align: left; } +@media screen and (max-width: 768px) { + .entry-share { + display: none; } } + .entry-excerpt { min-width: 320px; max-width: 640px; @@ -1903,7 +1915,7 @@ article li { .posted-on { font-size: 12px; - color: rgba(102, 99, 122, 0.29); + color: #9d9b9b; margin-bottom: 0; margin-top: 15px; } @@ -1918,7 +1930,7 @@ article li { color: #5A6B77; } .name-title .title { - color: rgba(102, 99, 122, 0.44); } + color: #9d9b9b; } .btn { background: 0 0; diff --git a/releases/next/docs/flatlist.html b/releases/next/docs/flatlist.html index e53f46c3c4f..f27e731f36a 100644 --- a/releases/next/docs/flatlist.html +++ b/releases/next/docs/flatlist.html @@ -56,15 +56,19 @@ class MyList extends ); } }
This is a convenience wrapper around <VirtualizedList>,
-and thus inherits it's props that aren't explicitly listed here along with the following caveats:
ScrollView) that aren't explicitly listed
+here, along with the following caveats:PureComponent which means that it will not re-render if props remain shallow-
-equal. Make sure that everything your renderItem function depends on is passed as a prop that
-is not === after updates, otherwise your UI may not update on changes. This includes the
-data prop and parent component state.renderItem function depends on is passed as a prop
+(e.g. extraData) that is not === after updates, otherwise your UI may not update on
+changes. This includes the data prop and parent component state.key prop on each item and uses that for the React key.
-Alternatively, you can provide a custom keyExtractor prop.Rendered in between each item, but not at the top or bottom.
Rendered at the bottom of all the items.
Rendered at the top of all the items.
Optional custom style for multi-item rows generated when numColumns > 1.
For simplicity, data is just a plain array. If you want to use something else, like an
+Alternatively, you can provide a custom keyExtractor prop.
NOTE: removeClippedSubviews might not be necessary and may cause bugs. If you see issues with
+content not rendering, e.g when using LayoutAnimation, try setting
+removeClippedSubviews={false}, and we may change the default in the future after more
+experimentation in production apps.
Rendered in between each item, but not at the top or bottom.
Rendered at the bottom of all the items.
Rendered at the top of all the items.
Optional custom style for multi-item rows generated when numColumns > 1.
For simplicity, data is just a plain array. If you want to use something else, like an
immutable list, use the underlying VirtualizedList directly.
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.
Provides additional metadata like index if you need it.
See ViewabilityHelper for flow type and further documentation.
Scrolls to the end of the content. May be janky without getItemLayout prop.
Scrolls to the item at a the specified index such that it is positioned in the viewable area
such that viewPosition 0 places it at the top, 1 at the bottom, and 0.5 centered in the
-middle.
May be janky without getItemLayout prop.
Requires linear scan through data - use scrollToIndex instead if possible. May be janky
-without getItemLayout prop.
Scroll to a specific content pixel offset, like a normal ScrollView.
Tells the list an interaction has occured, which should trigger viewability calculations, e.g.
+middle. viewOffset is a fixed number of pixels to offset the final target position.
Note: cannot scroll to locations outside the render window without specifying the
+getItemLayout prop.
Requires linear scan through data - use scrollToIndex instead if possible.
Note: cannot scroll to locations outside the render window without specifying the
+getItemLayout prop.
Scroll to a specific content pixel offset, like a normal ScrollView.
Tells the list an interaction has occured, which should trigger viewability calculations, e.g.
if waitForInteractions is true and the user has not scrolled. This is typically called by
taps on items or by navigation actions.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
A performant interface for rendering sectioned lists, supporting the most handy features:
If you don't need section support and want a simpler interface, use
-<FlatList>.
If you need sticky section header support, use ListView for now.
Simple Examples:
<FlatList>.Simple Examples:
This is a convenience wrapper around <VirtualizedList>,
-and thus inherits the following caveats:
This is a convenience wrapper around <VirtualizedList>,
+and thus inherits it's props (as well as those of ScrollView) that aren't explicitly listed
+here, along with the following caveats:
PureComponent which means that it will not re-render if props remain shallow-
-equal. Make sure that everything your renderItem function depends on is passed as a prop that
-is not === after updates, otherwise your UI may not update on changes. This includes the
-data prop and parent component state.renderItem function depends on is passed as a prop
+(e.g. extraData) that is not === after updates, otherwise your UI may not update on
+changes. This includes the data prop and parent component state.key prop on each item and uses that for the React key.
-Alternatively, you can provide a custom keyExtractor prop.Rendered in between adjacent Items within each section.
Rendered at the very end of the list.
Rendered at the very beginning of the list.
Rendered in between each section.
A marker property for telling the list to re-render (since it implements PureComponent). If
+Alternatively, you can provide a custom keyExtractor prop.
NOTE: removeClippedSubviews might not be necessary and may cause bugs. If you see issues with
+content not rendering, e.g when using LayoutAnimation, try setting
+removeClippedSubviews={false}, and we may change the default in the future after more
+experimentation in production apps.
Rendered in between adjacent Items within each section.
Rendered at the very end of the list.
Rendered at the very beginning of the list.
Rendered in between each section.
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.
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
@@ -39,8 +43,16 @@ sure to also set the refreshing prop correctly.
Called when the viewability of rows changes, as defined by the
-viewabilityConfig prop.
Set this true while waiting for new data from a refresh.
Default renderer for every item in every section. Can be over-ridden on a per-section basis.
Rendered at the top of each section. Sticky headers are not yet supported.
Makes section headers stick to the top of the screen until the next one pushes it off. Only -enabled by default on iOS because that is the platform standard there.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
viewabilityConfig prop.Set this true while waiting for new data from a refresh.
Default renderer for every item in every section. Can be over-ridden on a per-section basis.
Rendered at the top of each section. These stick to the top of the ScrollView by default on
+iOS. See stickySectionHeadersEnabled.
Makes section headers stick to the top of the screen until the next one pushes it off. Only +enabled by default on iOS because that is the platform standard there.
Scrolls to the item at the specified sectionIndex and itemIndex (within the section)
+positioned in the viewable area such that viewPosition 0 places it at the top (and may be
+covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. viewOffset is a
+fixed number of pixels to offset the final target position, e.g. to compensate for sticky
+headers.
Note: cannot scroll to locations outside the render window without specifying the
+getItemLayout prop.
Tells the list an interaction has occured, which should trigger viewability calculations, e.g.
+if waitForInteractions is true and the user has not scrolled. This is typically called by
+taps on items or by navigation actions.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
A component used to select a single value from a range of values.
If true the user won't be able to move the slider. Default value is false.
The color used for the track to the right of the button. Overrides the default blue gradient image on iOS.
Initial maximum value of the slider. Default value is 1.
The color used for the track to the left of the button. -Overrides the default blue gradient image on iOS.
Initial minimum value of the slider. Default value is 0.
Callback called when the user finishes changing the value (e.g. when -the slider is released).
Callback continuously called while the user is dragging the slider.
Step value of the slider. The value should be +Overrides the default blue gradient image on iOS.
Initial minimum value of the slider. Default value is 0.
Callback that is called when the user releases the slider, +regardless if the value has changed. The current value is passed +as an argument to the callback handler.
Callback continuously called while the user is dragging the slider.
Step value of the slider. The value should be between 0 and (maximumValue - minimumValue). Default value is 0.
Used to style and layout the Slider. See StyleSheet.js and
ViewStylePropTypes.js for more info.
Used to locate this view in UI automation tests.
Initial value of the slider. The value should be between minimumValue diff --git a/releases/next/docs/virtualizedlist.html b/releases/next/docs/virtualizedlist.html index 431e40bd154..08be5fe358e 100644 --- a/releases/next/docs/virtualizedlist.html +++ b/releases/next/docs/virtualizedlist.html @@ -7,15 +7,16 @@ window with appropriately sized blank space. The window adapts to scrolling beha 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.
Some caveats:
PureComponent which means that it will not re-render if props remain shallow-
-equal. Make sure that everything your renderItem function depends on is passed as a prop that
-is not === after updates, otherwise your UI may not update on changes. This includes the
-data prop and parent component state.renderItem function depends on is passed as a prop
+(e.g. extraData) that is not === after updates, otherwise your UI may not update on
+changes. This includes the data prop and parent component state.key prop on each item and uses that for the React key.
-Alternatively, you can provide a custom keyExtractor prop.NOTE: LayoutAnimation and sticky section headers both have bugs when used with this and are
-therefore not officially supported yet.
NOTE: removeClippedSubviews might not be necessary and may cause bugs. If you see issues with
-content not rendering, try disabling it, and we may change the default there.
The default accessor functions assume this is an Array<{key: string}> but you can override
+Alternatively, you can provide a custom keyExtractor prop.
NOTE: removeClippedSubviews might not be necessary and may cause bugs. If you see issues with
+content not rendering, e.g when using LayoutAnimation, try setting
+removeClippedSubviews={false}, and we may change the default in the future after more
+experimentation in production apps.
The default accessor functions assume this is an Array<{key: string}> but you can override getItem, getItemCount, and keyExtractor to handle any type of index-based data.
debug will turn on extra logging and visual overlays to aid with debugging both usage and
implementation, but with a significant perf hit.
DEPRECATED: 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
@@ -33,7 +34,7 @@ sure to also set the refreshing prop correctly.
Called when the viewability of rows changes, as defined by the
viewabilityConfig prop.
Set this true while waiting for new data from a refresh.
A native optimization that removes clipped subviews (those outside the parent) from the view hierarchy to offload work from the native rendering system. They are still kept around so no -memory is saved and state is preserved.
Render a custom scroll component, e.g. with a differently styled RefreshControl.
Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off +memory is saved and state is preserved.
Render a custom scroll component, e.g. with a differently styled RefreshControl.
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.
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
diff --git a/showcase.html b/showcase.html
index 3796b5ed614..ea722c5a041 100644
--- a/showcase.html
+++ b/showcase.html
@@ -1,4 +1,4 @@
-