Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Image Component | Basic Concepts
course content

Course Content

Foundations of React Native

Image ComponentImage Component

Theory

  • The Image component is used to display images in your app;
  • It's similar to the HTML <img> tag;
  • You can set the source of the image using the source prop;
  • Including the image's dimensions by providing its width and height is important.

Example

Code Description
  • Line 2: Imports the Image component from the react-native library.
  • Line 4: Declares a functional component named App.
  • Lines 5-16: The component returns a View component containing a Text component and an Image component. The Image component is displaying an image fetched from a remote URI. The width and height props are set to 64 to specify the dimensions of the displayed image.
  • In Practice

    Everything was clear?

    Section 2. Chapter 4
    course content

    Course Content

    Foundations of React Native

    Image ComponentImage Component

    Theory

    • The Image component is used to display images in your app;
    • It's similar to the HTML <img> tag;
    • You can set the source of the image using the source prop;
    • Including the image's dimensions by providing its width and height is important.

    Example

    Code Description
  • Line 2: Imports the Image component from the react-native library.
  • Line 4: Declares a functional component named App.
  • Lines 5-16: The component returns a View component containing a Text component and an Image component. The Image component is displaying an image fetched from a remote URI. The width and height props are set to 64 to specify the dimensions of the displayed image.
  • In Practice

    Everything was clear?

    Section 2. Chapter 4
    some-alt