Question from the React Native (Legacy) test

Which of the following modified versions of the component allows it to be used in a React Native project?

Hard

For the following component, which modified version allows it to be used in a React Native project?

Example:
const MyComponent = () => (
	<div>
		My Component
		<img src="https://facebook.github.io/react-native/img/header_logo.png"/>
	</div>
)
Code A:
import React from 'react'
const MyComponent = () => (
	<div>
		My Component
		<img src="https://facebook.github.io/react-native/img/header_logo.png"/>
	</div>
)

Code B:
import React from 'react'
import {Div, Img} from 'react-native'
const MyComponent = () => (
	<Div>
		My Component
		<Img src="https://facebook.github.io/react-native/img/header_logo.png"/>
	</Div>
)

Code C:
import React from 'react'
import {View, Image} from 'react-native'
const MyComponent = () => (
	<View>
		My Component
		<Image source={{uri: "https://facebook.github.io/react-native/img/header_logo.png"}} />
	</View>
)

Code D:
import React from 'react'
import {View, Text, Image} from 'react-native'
const MyComponent = () => (
	<View>
		<Text>
			My Component
		</Text>
		<Image source={{uri: "https://facebook.github.io/react-native/img/header_logo.png"}} />
	</View>
)

Author: Vincent CotroStatus: Published(Update)Question passed 365 times
Edit
-2
Community EvaluationsNo one has reviewed this question yet, be the first!