-1

I need to show an image (eg:blur image) with loading indicator shows the image is loading in UI. For eg) In facebook app feed posts are shows as loading before it fetch from server. I need the same.

Any suggestion or any package in react-native?

sejn
  • 2,040
  • 6
  • 28
  • 82

1 Answers1

0

We have opacity prop and blurRadius prop for image in react native. so what you can do is.... you can use async function to check if image is completely downloaded ...if yes then setState({downloaded:true}) and then if downloaded is true , based on your choice you can change the opacity to 100% for addon..you can even use activityindicator on top of that. i hope it solves your problem... you can also refer to this link : https://medium.com/the-react-native-log/progressive-image-loading-in-react-native-ecc88e724343

  • I have another use case also, one image with a loading indicator as center and image is not blurred. The above is applicable only before loading. I need to change from one image to another image inside a view. Center of the image I need to show the loading icon – sejn Aug 07 '19 at 11:15