import { useRef } from 'react'; import { Animated, Image as NativeImage, type ImageProps as NativeProps, Platform } from 'react-native'; import styles from './styles'; export type ImageProps = Omit & { source: string; headers?: Record; }; export function Image({ source, headers, style, ...rest }: ImageProps) { const opacity = useRef(new Animated.Value(0)); const isIos = Platform.OS === 'ios'; // Fade in image on load for iOS. Android does this by default. const onLoadEnd = () => { Animated.timing(opacity.current, { toValue: 1, duration: 150, useNativeDriver: true }).start(); }; return isIos ? ( ) : ( ); }