Image caching — store images locally for faster loading.
Built-in Image:
1import { Image } from "react-native";23<Image4 source={{ uri: "https://example.com/image.jpg" }}5 style={{ width: 200, height: 200 }}6 defaultSource={require("./placeholder.png")}7/>
With react-native-fast-image:
1import FastImage from 'react-native-fast-image';23<FastImage4 source={{5 uri: "https://example.com/image.jpg",6 priority: FastImage.priority.normal,7 }}8 style={{ width: 200, height: 200 }}9 resizeMode={FastImage.resizeMode.cover}10/>
Caching strategies:
FastImage features: