import * as FileSystem from "expo-file-system"; import React, { useEffect, useState } from "react"; import { SafeAreaView, Text } from "react-native"; import { Button, Text as NBText } from "native-base"; export default function ScreenMediaCache() { const [images, setImages] = useState([]); useEffect(() => { (async () => { setImages( ( await FileSystem.readDirectoryAsync( FileSystem.documentDirectory + "photos" ) ).map((f) => { return { uri: FileSystem.documentDirectory + "photos/" + f, dimensions: { width: 2142, height: 4224 }, }; }) ); })(); }, []); return ( This is the media cache screen. ); }