File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,17 @@ The simplest way to render an image is to provide a source file to that image vi
1616This example displays a checkbox ` Image ` on the device.
1717
1818``` ReactNativeWebPlayer
19- import React from 'react';
19+ import React, { Component } from 'react';
2020import { AppRegistry, Image } from 'react-native';
2121
22- const AwesomeProject = () => {
23- return (
24- <Image source={require('./img/favicon.png')} />
25- );
22+ class ImageBasics extends Component {
23+ render() {
24+ return (
25+ <Image source={require('./img/favicon.png')} />
26+ );
27+ }
2628}
2729
2830// App registration and rendering
29- AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject );
31+ AppRegistry.registerComponent('AwesomeProject', () => ImageBasics );
3032```
You can’t perform that action at this time.
0 commit comments