From ee742277af141f2d7bb6e61f78f1b94478e81c37 Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Thu, 23 Jun 2016 12:24:58 -0700 Subject: [PATCH] ES6-ify Image Basics Summary: Closes https://github.com/facebook/react-native/pull/8365 Differential Revision: D3477411 Pulled By: caabernathy fbshipit-source-id: 26214fcf13c9e1352e198f34fcd6f5e88f1fe2da --- docs/Basics-Component-Image.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/Basics-Component-Image.md b/docs/Basics-Component-Image.md index 23c0a2e15..0682fa62a 100644 --- a/docs/Basics-Component-Image.md +++ b/docs/Basics-Component-Image.md @@ -16,15 +16,17 @@ The simplest way to render an image is to provide a source file to that image vi This example displays a checkbox `Image` on the device. ```ReactNativeWebPlayer -import React from 'react'; +import React, { Component } from 'react'; import { AppRegistry, Image } from 'react-native'; -const AwesomeProject = () => { - return ( - - ); +class ImageBasics extends Component { + render() { + return ( + + ); + } } // App registration and rendering -AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject); +AppRegistry.registerComponent('AwesomeProject', () => ImageBasics); ```