How to use cacheImages for FlatList

I built images gallery by FlatList in my app, like this, it depends on a “react-native-img-cache” module.
In expo, I’m trying to build it like this:


async _loadAssetsAsync() {
        let assets = [], i;
        for (i = 0; i <; i++) {

        const imageAssets = cacheImages(assets);

        await Promise.all([

        this.setState({appIsReady: true});

                data = {}
                renderItem={({item}) =>
                            source={{uri: item.key}}


It seems images have not been cached, what is the correct way to build this?


What does cacheImage do? It looks like react-native-img-cache won’t work with Expo since it depends on some native code, but we already have image caching utilities built in. Have you looked at this