Show Image From HTTP URL In React Native

Опубликовано: 01 Июль 2018
на канале: Skptricks
2,699
9

Post Link : https://www.skptricks.com/2018/07/sho...

In this tutorial we will explain how to display image in react native application using HTTP URL. This example covers, fetching and displaying an image from network location using Image Component of react native.

Point To Remember while loading image in Image Component.
Note that for network and data images, you will need to manually specify the dimensions of your image!
Show Image From HTTP URL in React Native

App.js
This Component helps to display image from HTTP URL. Follow the below steps, that helps to configure Image Component in App Component.

1. Add Image Component in import block.
2. Add Image tag in render’s return block.
Source attribute in Image tag, where we are specifying the image location.
Also we have added inline style to Image tag, that helps to set the image size as per the device width.

Post Link : https://www.skptricks.com/2018/07/sho...