@@ -77,8 +77,39 @@ pn.Column(
7777
7878** Lists:**
7979
80- - [ ` FlatList(data, render_item, key_extractor, separator_height) ` ] [ pythonnative.FlatList ] :
81- scrollable data list.
80+ - [ ` FlatList(data, render_item, key_extractor, item_height, ...) ` ] [ pythonnative.FlatList ] :
81+ scrollable data list. Pass ` item_height= ` to enable native
82+ virtualization (` UITableView ` / ` RecyclerView ` ); rows are mounted
83+ lazily as they scroll into view.
84+ - [ ` SectionList(sections, render_item, render_section_header, item_height, ...) ` ] [ pythonnative.SectionList ] :
85+ virtualized list with section headers.
86+
87+ ** Platform UI:**
88+
89+ - [ ` StatusBar(style, background_color, hidden) ` ] [ pythonnative.StatusBar ] :
90+ configure the device's status bar (light/dark icons, color, hidden).
91+ - [ ` KeyboardAvoidingView(*children, behavior) ` ] [ pythonnative.KeyboardAvoidingView ] :
92+ shift content up when the software keyboard appears.
93+ - [ ` RefreshControl(refreshing, on_refresh) ` ] [ pythonnative.RefreshControl ] :
94+ pull-to-refresh spec for ` ScrollView ` and ` FlatList ` (passed via
95+ the ` refresh_control= ` prop).
96+ - [ ` Picker(value, items, on_change, placeholder) ` ] [ pythonnative.Picker ] :
97+ select / dropdown widget backed by an action sheet.
98+
99+ ** Imperative APIs:**
100+
101+ - [ ` Alert.show(title, message, buttons, style) ` ] [ pythonnative.Alert ] :
102+ present a native alert dialog or action sheet.
103+ - [ ` Alert.confirm(title, on_confirm, on_cancel) ` ] [ pythonnative.alerts.Alert.confirm ] :
104+ two-button confirm/cancel.
105+
106+ ** Animations:**
107+
108+ - ` Animated.View ` / ` Animated.Text ` / ` Animated.Image ` : components
109+ whose ` style ` accepts [ ` AnimatedValue ` ] [ pythonnative.AnimatedValue ]
110+ instances. Drive animations with ` Animated.timing ` ,
111+ ` Animated.spring ` , or ` Animated.decay ` . See the
112+ [ Animations guide] ( ../guides/animations.md ) .
82113
83114### Flex layout model
84115
@@ -214,7 +245,9 @@ hook state.
214245- [ ` use_callback(fn, deps) ` ] [ pythonnative.use_callback ] : stable
215246 function references.
216247- [ ` use_ref(initial) ` ] [ pythonnative.use_ref ] : mutable ref that
217- persists across renders.
248+ persists across renders. When passed via the ` ref= ` prop, the
249+ reconciler populates ` ref["current"] ` with the underlying native
250+ view.
218251- [ ` use_context(context) ` ] [ pythonnative.use_context ] : read from a
219252 context provider.
220253- [ ` use_navigation() ` ] [ pythonnative.use_navigation ] : navigation
@@ -223,6 +256,12 @@ hook state.
223256 current route params.
224257- [ ` use_focus_effect(effect, deps) ` ] [ pythonnative.use_focus_effect ] :
225258 like ` use_effect ` but only runs when the screen is focused.
259+ - [ ` use_window_dimensions() ` ] [ pythonnative.use_window_dimensions ] :
260+ reactive viewport size.
261+ - [ ` use_safe_area_insets() ` ] [ pythonnative.use_safe_area_insets ] :
262+ reactive safe-area insets.
263+ - [ ` use_keyboard_height() ` ] [ pythonnative.use_keyboard_height ] :
264+ reactive software-keyboard height.
226265
227266### Custom hooks
228267
@@ -257,15 +296,22 @@ def MyComponent():
257296
258297## Platform detection
259298
260- Use ` utils.IS_ANDROID ` / ` utils.IS_IOS ` when you need
261- platform-specific logic :
299+ The recommended way to write platform-aware code is via
300+ [ ` Platform ` ] [ pythonnative.Platform ] :
262301
263302``` python
264- from pythonnative.utils import IS_ANDROID
303+ import pythonnative as pn
304+
305+ title = pn.Platform.select({" ios" : " iOS App" , " android" : " Android App" })
265306
266- title = " Android App" if IS_ANDROID else " iOS App"
307+ if pn.Platform.is_ios:
308+ margin = 16
267309```
268310
311+ ` pn.Platform.OS ` is ` "ios" ` , ` "android" ` , or ` "test" ` (the latter
312+ when running off-device, e.g., in unit tests). The lower-level
313+ ` utils.IS_ANDROID ` / ` utils.IS_IOS ` constants are still available.
314+
269315## Next steps
270316
271317- Learn the renderer underneath: [ Architecture] ( architecture.md ) .
0 commit comments