ScrollViewContent
Lay out the children that move together inside a ScrollView.
App.tsx
<ScrollView> <ScrollViewContent layout={{ padding: 0 }} > {stops} </ScrollViewContent></ScrollView>Trail itinerary
Use ScrollViewContent as the direct and only child of ScrollView. Put every section you want to scroll inside it. The measured content determines how far the user can scroll.
import { ScrollView, ScrollViewContent, Text } from 'react-nitro-renderer'
export function NotePage({ body }: { body: string }) {
return (
<ScrollView>
<ScrollViewContent layout={{ padding: 20 }}>
<Text fontWeight="bold">Field notes</Text>
<Text>{body}</Text>
</ScrollViewContent>
</ScrollView>
)
}Here the 20-point padding scrolls with the text. Place a fixed header outside the ScrollView when it should stay on screen. ScrollView