Q39.webp
Enmu90

Q39.webp

  • Media owner Enmu90
  • Ngày thêm
Question: 39
(Choose 1 answer)
Which of the following code snippets demonstrates how to conditionally render a component for Android
using the Platform module?
import React from 'react';
import { Platform, Text} from 'react-native';
export default function App() {
return (
<Text>
{Platform.OS === 'android' ? 'Hello Android': 'Hello iOS'}
</Text>
);
A. The code will display "Hello Android" only on iOS.
B. The code will display "Hello iOS" on both platforms.
C. The code will display "Hello Android" on Android and "Hello iOS" on iOS.
D. The code will crash on Android devices.

Thông tin

Category
MMA301
Thêm bởi
Enmu90
Ngày thêm
Lượt xem
1,925
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom