I just first time to develop an react-native application. I'm using react-native-router-flux
for navigation and have to create an feed page that showing feed in Image
and Text
component using react-native FlatList
. The problem is, the application is so slow at getting some data from from remote server, even using localhost.
the data is formated like this
{
[
title : "Test title",
description : "Test Description",
imageUrl : 'http://192.168.22.22:8887/image.png'
],
[
title : "Test title 2",
description : "Test Description 2",
imageUrl : 'http://192.168.22.22:8887/image2.png'
]
}
I have tried to accessing the api url from browser and it done fast as well. But when I'm accessing via my react-native application, it so slow. Like 7 second to wait the page done to load the fetch data. I think the problem is when im using image from remote data. I'm do it like this
<Image
style={{width: 50, height: 50}}
source={{uri: HOST_URL + '/' + rowData.imageUrl }}
/>
Is this posible to improve the speed? Is using the loading remote Image
influence the speed? Or I must loading images using lazy image loading concept?