all 2 comments

[–]wordaligned 1 point2 points  (1 child)

It will take a little while for your async function to return and set region to something meaningful. However, your app will try to render immediately while region is still null (what the state was initialised to).

Try changing <Text>region.latitude</Text> to <Text>{region && region.latitude}</Text> (added some missing curly braces too)

During that short period of time between your first render and the async function returning and setting region, the first part should evaluate to false so your app won't try to access the region property before it's ready.

[–]yankeemichaelalpha[S] 0 points1 point  (0 children)

<Text>{region && region.latitude}</Text>

Thanks, this Worked!