forked from react/react-native-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
81 lines (76 loc) · 2.89 KB
/
Copy pathindex.tsx
File metadata and controls
81 lines (76 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import Section from '../components/Section';
import SectionTitle from '../components/SectionTitle';
import ThemedImage from '@theme/ThemedImage';
import FoxFact from './FoxFact';
import styles from './styles.module.css';
import useBaseUrl from '@docusaurus/useBaseUrl';
function Platforms() {
return (
<Section>
<SectionTitle
title="Create native apps for Android, iOS, and more using React"
description="React Native brings the best parts of developing with React to native development. It's a best-in-class JavaScript library for building user interfaces."
/>
<div className={styles.platformsContainer}>
<div className={styles.featureContainer}>
<div className={styles.codeEditor}>
<div className={styles.codeEditorTitleContainer}>index.js</div>
<div className={styles.codeEditorContentContainer}>
<pre>
<span style={{color: 'var(--home-code-red)'}}>function</span>{' '}
<span style={{color: 'var(--home-code-purple'}}>
HomeScreen
</span>
{`()`}
{` {`} <br />
<span
style={{color: 'var(--home-code-red)'}}>{` return `}</span>
{`(`} <br />
{` <`}
<span style={{color: 'var(--home-code-green)'}}>View</span>
{`>`} <br />
{` <`}
<span style={{color: 'var(--home-code-green)'}}>{`Text`}</span>
{`>`} Hello World 👋 🌍!{`</`}
<span style={{color: 'var(--home-code-green)'}}>{`Text`}</span>
{`>`}
<br />
{` </`}
<span style={{color: 'var(--home-code-green)'}}>View</span>
{`>`} <br />
{` );`} <br />
{`}`}
</pre>
</div>
</div>
<div className={styles.deviceContainer}>
<ThemedImage
alt="Android device and iOS device"
className={styles.devices}
sources={{
light: useBaseUrl('/img/homepage/devices.png'),
dark: useBaseUrl('/img/homepage/devices-dark.png'),
}}
/>
</div>
</div>
</div>
<div className={styles.foxFactContainer}>
<FoxFact className={styles.fox} />
<p>
<strong>Written in JavaScript, rendered with native code.</strong>{' '}
React primitives render to native platform UI, meaning your app uses
the same native platform APIs other apps do.
</p>
</div>
</Section>
);
}
export {Platforms};