mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: TLDR even more docs changes So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up. Closes https://github.com/facebook/react-native/pull/8329 Differential Revision: D3471669 Pulled By: JoelMarcey fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
861 B
861 B
id, title, layout, category, permalink, next
| id | title | layout | category | permalink | next |
|---|---|---|---|---|---|
| basics-component-image | Image | docs | The Basics | docs/basics-component-image.html | basics-component-view |
Another basic React Native component is the Image component. Like Text, the Image component simply renders an image.
An
Imageis analogous to the<img>HTML tag when building websites.
The simplest way to render an image is to provide a source file to that image via the source attribute.
This example displays a checkbox Image on the device.
import React from 'react';
import { AppRegistry, Image } from 'react-native';
const AwesomeProject = () => {
return (
<Image source={require('./img/check.png')} />
);
}
// App registration and rendering
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);