import { Image, ImageSource } from 'expo-image'; import { useCallback, useState } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import Button from '../../components/Button'; import { Colors } from '../../constants'; const generateSeed = () => 1 + Math.round(Math.random() * 10); export default function ImagePlaceholderScreen() { const [source, setSource] = useState(null); const loadAnyImage = useCallback(() => { setSource({ uri: getRandomImageUri() }); }, [source]); const resetSource = useCallback(() => { setSource(null); }, [source]); return ( At first you should see only a placeholder{'\n'} as the source is not defined yet Set one below and try it multiple times{'\n'} to confirm that the placeholder is not{'\n'} displayed when switching the sources{'\n'} 👇