Skip to content

Commit 95accdf

Browse files
authored
Merge branch 'main' into docs/android-nonlinear-font-scaling
2 parents 527572e + 87aac33 commit 95accdf

39 files changed

Lines changed: 833 additions & 158 deletions

‎docs/components-and-apis.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ These components may be useful for certain applications. For an exhaustive list
198198
<p>Provides access to the device pixel density.</p>
199199
</a>
200200
</div>
201+
<div className="component">
202+
<a href="./reactnativeversion">
203+
<h3>ReactNativeVersion</h3>
204+
<p>Exposes the resolved React Native package version on the JS side.</p>
205+
</a>
206+
</div>
201207
<div className="component">
202208
<a href="./refreshcontrol">
203209
<h3>RefreshControl</h3>

‎docs/drawerlayoutandroid.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
id: drawerlayoutandroid
3-
title: DrawerLayoutAndroid
3+
title: '🗑️ DrawerLayoutAndroid'
44
---
55

6+
:::warning[Deprecated]
7+
Use [`react-native-drawer-layout`](https://reactnavigation.org/docs/drawer-layout/) instead.
8+
:::
9+
610
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
711

812
React component that wraps the platform `DrawerLayout` (Android only). The Drawer (typically used for navigation) is rendered with `renderNavigationView` and direct children are the main view (where your content goes). The navigation view is initially not visible on the screen, but can be pulled in from the side of the window specified by the `drawerPosition` prop and its width can be set by the `drawerWidth` prop.

‎docs/imagebackground.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
id: imagebackground
3-
title: ImageBackground
3+
title: '🗑️ ImageBackground'
44
---
55

6+
:::warning[Deprecated]
7+
Use a [`View`](view.md) with an absolutely positioned [`Image`](image.md) instead.
8+
:::
9+
610
A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `<ImageBackground>` component, which has the same props as `<Image>`, and add whatever children to it you would like to layer on top of it.
711

812
You might not want to use `<ImageBackground>` in some cases, since the implementation is basic. Refer to `<ImageBackground>`'s [source code](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Image/ImageBackground.js) for more insight, and create your own custom component when needed.

‎docs/reactnativeversion.md‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
id: reactnativeversion
3+
title: ReactNativeVersion
4+
---
5+
6+
```tsx
7+
import {ReactNativeVersion} from 'react-native';
8+
```
9+
10+
The `ReactNativeVersion` API exposes the version of the resolved `react-native` package on JS side. Apps and libraries can use it to check compatibility or enable version-specific behavior.
11+
12+
:::note
13+
14+
Also, we have [`Platform.constants.reactNativeVersion`](platform#constants) in our public API already. **However**, this is the per-platform _**native-reported**_ React Native version.
15+
16+
:::
17+
18+
## Example
19+
20+
```tsx
21+
import {ReactNativeVersion} from 'react-native';
22+
23+
const version = ReactNativeVersion.getVersionString(); // 0.88.1
24+
const {major, minor, patch, prerelease} = ReactNativeVersion;
25+
major; // 0
26+
minor; // 88
27+
patch; // 1
28+
prerelease; // null
29+
```
30+
31+
---
32+
33+
# Reference
34+
35+
## Properties
36+
37+
### `major`
38+
39+
```tsx
40+
static major: number;
41+
```
42+
43+
The major version number of the resolved `react-native` package.
44+
45+
---
46+
47+
### `minor`
48+
49+
```tsx
50+
static minor: number;
51+
```
52+
53+
The minor version number of the resolved `react-native` package.
54+
55+
---
56+
57+
### `patch`
58+
59+
```tsx
60+
static patch: number;
61+
```
62+
63+
The patch version number of the resolved `react-native` package.
64+
65+
---
66+
67+
### `prerelease`
68+
69+
```tsx
70+
static prerelease: string | null;
71+
```
72+
73+
The prerelease tag for the resolved `react-native` package, or `null` for stable releases.
74+
75+
## Methods
76+
77+
### `getVersionString()`
78+
79+
```tsx
80+
static getVersionString(): string;
81+
```
82+
83+
Returns the full version string in the format `major.minor.patch` or `major.minor.patch-prerelease`.

‎docs/the-new-architecture/pure-cxx-modules.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this guide, we will go through the creation of a pure C++ Turbo Native Module
1919
The rest of this guide assumes that you have created your application running the command:
2020

2121
<CodeBlock language="bash" title="shell">
22-
{`npx @react-native-community/cli@latest init SampleApp --version ${getCurrentVersion()}`}
22+
{`npx @react-native-community/cli@latest init SampleApp --version "${getCurrentVersion()}"`}
2323
</CodeBlock>
2424

2525
## 1. Create the JS specs

‎docs/the-new-architecture/using-codegen.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The **Codegen** process is tightly coupled with the build of the app, and the sc
1919
For the sake of this guide, create a project using the React Native CLI as follows:
2020

2121
<CodeBlock language="bash" title="shell">
22-
{`npx @react-native-community/cli@latest init SampleApp --version ${getCurrentVersion()}`}
22+
{`npx @react-native-community/cli@latest init SampleApp --version "${getCurrentVersion()}"`}
2323
</CodeBlock>
2424

2525
**Codegen** is used to generate the glue-code for your custom modules or components. See the guides for Turbo Native Modules and Fabric Native Components for more details on how to create them.

‎docs/turbo-native-modules.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The basic steps are:
2424
Lets work through each of these steps by building an example Turbo Native Module. The rest of this guide assume that you have created your application running the command:
2525

2626
<CodeBlock language="bash" title="shell">
27-
{`npx @react-native-community/cli@latest init TurboModuleExample --version ${getCurrentVersion()}`}
27+
{`npx @react-native-community/cli@latest init TurboModuleExample --version "${getCurrentVersion()}"`}
2828
</CodeBlock>
2929

3030
## Native Persistent Storage

‎website/releases/branches.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The table below indicates what's included in the React Native platform for each
1515

1616
| Branch | React<a href="https://github.com/facebook/react" target="_blank" rel="noreferrer"><IconExternalLink /></a> | Hermes (Legacy)<a href="https://github.com/facebook/hermes" target="_blank" rel="noreferrer"><IconExternalLink /></a> | Hermes V1<a href="https://github.com/facebook/hermes" target="_blank" rel="noreferrer"><IconExternalLink /></a> | Yoga<a href="https://github.com/facebook/yoga" target="_blank" rel="noreferrer"><IconExternalLink /></a> | React Native<br />DevTools frontend<a href="https://github.com/react/react-native-devtools-frontend" target="_blank" rel="noreferrer"><IconExternalLink /></a> |
1717
| ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18+
| 0.88-stable<a href="https://github.com/react/react-native/tree/0.88-stable" target="_blank" rel="noreferrer"><IconExternalLink /></a> | `19.2.3` | — | `v260318099.0.2` | [`98300847`](https://github.com/facebook/yoga/commit/983008479) | `chromium/7103`<br />(Chrome 136) |
1819
| 0.87-stable<a href="https://github.com/react/react-native/tree/0.87-stable" target="_blank" rel="noreferrer"><IconExternalLink /></a> | `19.2.3` | — | `v250829098.0.16` | [`ee004e6b`](https://github.com/facebook/yoga/commit/ee004e6b3) | `chromium/7103`<br />(Chrome 136) |
1920
| 0.86-stable<a href="https://github.com/react/react-native/tree/0.86-stable" target="_blank" rel="noreferrer"><IconExternalLink /></a> | `19.2.3` | `v0.17.0` | `v250829098.0.16` | [`c76b52b2`](https://github.com/facebook/yoga/commit/c76b52b20) | `chromium/7103`<br />(Chrome 136) |
2021
| 0.85-stable<a href="https://github.com/react/react-native/tree/0.85-stable" target="_blank" rel="noreferrer"><IconExternalLink /></a> | `19.2.3` | `v0.16.0` | `v250829098.0.10` | [`cfdacac0`](https://github.com/facebook/yoga/commit/cfdacac0e) | `chromium/7103`<br />(Chrome 136) |

‎website/showcase.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,20 @@
350350
"icon": "brex.png",
351351
"linkAppStore": "https://apps.apple.com/us/app/brex/id1472905508",
352352
"linkPlayStore": "https://play.google.com/store/apps/details?id=com.brex.mobile&hl=en_US&gl=US"
353+
},
354+
{
355+
"name": "Starlink",
356+
"icon": "starlink.webp",
357+
"linkAppStore": "https://apps.apple.com/us/app/starlink/id1537177988",
358+
"linkPlayStore": "https://play.google.com/store/apps/details?id=com.starlink.mobile",
359+
"pinned": true
360+
},
361+
{
362+
"name": "Grok Bot",
363+
"icon": "grok-bot.webp",
364+
"linkAppStore": "https://apps.apple.com/us/app/grok-bot/id6794501026",
365+
"linkPlayStore": "https://play.google.com/store/apps/details?id=ai.x.grok.bot",
366+
"pinned": true
353367
}
354368
]
355369
}

‎website/sidebars.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ export default {
214214
'pixelratio',
215215
'platform',
216216
'platformcolor',
217+
'reactnativeversion',
217218
'roottag',
218219
'share',
219220
'stylesheet',

0 commit comments

Comments
 (0)