import { Image } from 'expo-image'; import { useCallback, useState } from 'react'; import { ScrollView, StyleSheet, Text, View } from 'react-native'; import Button from '../../components/Button'; import MonoText from '../../components/MonoText'; import { Colors } from '../../constants'; export default function ImagePlaceholderScreen() { const [uri, setUri] = useState(getRandomImageUri()); const [isLoading, setIsLoading] = useState(true); const loadRandomImage = useCallback(() => { setIsLoading(true); setUri(getRandomImageUri()); }, [uri]); const source = { uri, cacheKey: 'CUSTOM_CONSTANT_CACHE_KEY', }; return ( { if (cacheType === 'disk') { alert('Image was loaded from the disk cache'); } setIsLoading(false); }} /> {`const source = ${JSON.stringify(source, null, 2)}`} At first let's make sure the disk cache is cleared{'\n'} 👇