diff --git a/website/versioned_docs/version-0.86/_canary-channel-api-warning.mdx b/website/versioned_docs/version-0.86/_canary-channel-api-warning.mdx
new file mode 100644
index 00000000000..2c1ae5cf423
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_canary-channel-api-warning.mdx
@@ -0,0 +1,7 @@
+:::tip[Canary 🧪]
+
+**This API is currently only available in React Native’s Canary and Experimental channels.**
+
+If you want to try it out, please [enable the Canary Channel](releases/release-levels) in your app.
+
+:::
diff --git a/website/versioned_docs/version-0.86/_experimental-api-warning.mdx b/website/versioned_docs/version-0.86/_experimental-api-warning.mdx
new file mode 100644
index 00000000000..6829b79a4f0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_experimental-api-warning.mdx
@@ -0,0 +1,5 @@
+:::important[Experimental 🧪]
+
+**This API is experimental.** Experimental APIs may contain bugs and are likely to change in a future version of React Native. Don't use them in production.
+
+:::
diff --git a/website/versioned_docs/version-0.86/_experimental-channel-api-warning.mdx b/website/versioned_docs/version-0.86/_experimental-channel-api-warning.mdx
new file mode 100644
index 00000000000..92a7b2c8c2f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_experimental-channel-api-warning.mdx
@@ -0,0 +1,9 @@
+:::important[Experimental Feature 🧪]
+
+**This API is currently only available in React Native’s Experimental channels.**
+
+Experimental APIs may contain bugs and are likely to change in a future version of React Native. Don't use them in production.
+
+If you want to try it out, please [enable the Experimental Channel](releases/release-levels) in your app.
+
+:::
diff --git a/website/versioned_docs/version-0.86/_fabric-native-components.jsx b/website/versioned_docs/version-0.86/_fabric-native-components.jsx
new file mode 100644
index 00000000000..fc6a3171a4f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_fabric-native-components.jsx
@@ -0,0 +1,11 @@
+import React from 'react';
+import IOSContent from './fabric-native-components-ios.md';
+import AndroidContent from './fabric-native-components-android.md';
+
+export function FabricNativeComponentsIOS() {
+ return ;
+}
+
+export function FabricNativeComponentsAndroid() {
+ return ;
+}
diff --git a/website/versioned_docs/version-0.86/_getting-started-linux-android.md b/website/versioned_docs/version-0.86/_getting-started-linux-android.md
new file mode 100644
index 00000000000..bc953397bcc
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_getting-started-linux-android.md
@@ -0,0 +1,117 @@
+## Installing dependencies
+
+You will need Node, the React Native command line interface, a JDK, and Android Studio.
+
+While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.
+
+
Node
+
+Follow the [installation instructions for your Linux distribution](https://nodejs.org/en/download/package-manager/) to install Node 22.11.0 or newer.
+
+
Java Development Kit
+
+React Native currently recommends version 17 of the Java SE Development Kit (JDK). You may encounter problems using higher JDK versions. You may download and install [OpenJDK](https://openjdk.java.net) from [AdoptOpenJDK](https://adoptopenjdk.net/) or your system packager.
+
+
Android development environment
+
+Setting up your development environment can be somewhat tedious if you're new to Android development. If you're already familiar with Android development, there are a few things you may need to configure. In either case, please make sure to carefully follow the next few steps.
+
+
1. Install Android Studio
+
+[Download and install Android Studio](https://developer.android.com/studio). While on Android Studio installation wizard, make sure the boxes next to all of the following items are checked:
+
+- `Android SDK`
+- `Android SDK Platform`
+- `Android Virtual Device`
+
+Then, click "Next" to install all of these components.
+
+:::note
+If the checkboxes are grayed out, you will have a chance to install these components later on.
+:::
+
+Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
+
+
2. Install the Android SDK
+
+Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the `Android 15 (VanillaIceCream)` SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.
+
+To do that, open Android Studio, click on "Configure" button and select "SDK Manager".
+
+:::tip
+The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
+:::
+
+Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 15 (VanillaIceCream)` entry, then make sure the following items are checked:
+
+- `Android SDK Platform 35`
+- `Intel x86 Atom_64 System Image` or `Google APIs Intel x86 Atom System Image`
+
+Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the "Android SDK Build-Tools" entry, then make sure that `36.0.0` and `Android SDK Command-line Tools (latest)` are selected.
+
+Finally, click "Apply" to download and install the Android SDK and related build tools.
+
+
3. Configure the ANDROID_HOME environment variable
+
+The React Native tools require some environment variables to be set up in order to build apps with native code.
+
+Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you are using `zsh` then `~/.zprofile` or `~/.zshrc`) config file:
+
+```shell
+export ANDROID_HOME=$HOME/Android/Sdk
+export PATH=$PATH:$ANDROID_HOME/emulator
+export PATH=$PATH:$ANDROID_HOME/platform-tools
+```
+
+:::note
+`.bash_profile` is specific to `bash`. If you're using another shell, you will need to edit the appropriate shell-specific config file.
+:::
+
+Type `source $HOME/.bash_profile` for `bash` or `source $HOME/.zprofile` to load the config into your current shell. Verify that ANDROID_HOME has been set by running `echo $ANDROID_HOME` and the appropriate directories have been added to your path by running `echo $PATH`.
+
+:::note
+Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
+:::
+
+
Watchman
+
+Follow the [Watchman installation guide](https://facebook.github.io/watchman/docs/install#buildinstall) to compile and install Watchman from source.
+
+:::info
+[Watchman](https://facebook.github.io/watchman/docs/install) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance and increased compatibility in certain edge cases (translation: you may be able to get by without installing this, but your mileage may vary; installing this now may save you from a headache later).
+:::
+
+
Preparing the Android device
+
+You will need an Android device to run your React Native Android app. This can be either a physical Android device, or more commonly, you can use an Android Virtual Device which allows you to emulate an Android device on your computer.
+
+Either way, you will need to prepare the device to run Android apps for development.
+
+
Using a physical device
+
+If you have a physical Android device, you can use it for development in place of an AVD by plugging it in to your computer using a USB cable and following the instructions [here](running-on-device.md).
+
+
Using a virtual device
+
+If you use Android Studio to open `./AwesomeProject/android`, you can see the list of available Android Virtual Devices (AVDs) by opening the "AVD Manager" from within Android Studio. Look for an icon that looks like this:
+
+
+
+If you have recently installed Android Studio, you will likely need to [create a new AVD](https://developer.android.com/studio/run/managing-avds.html). Select "Create Virtual Device...", then pick any Phone from the list and click "Next", then select the **VanillaIceCream** API Level 35 image.
+
+:::tip
+We recommend configuring [VM acceleration](https://developer.android.com/studio/run/emulator-acceleration.html#vm-linux) on your system to improve performance. Once you've followed those instructions, go back to the AVD Manager.
+:::
+
+Click "Next" then "Finish" to create your AVD. At this point you should be able to click on the green triangle button next to your AVD to launch it.
+
+
That's it!
+
+Congratulations! You successfully set up your development environment.
+
+
+
+
Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
diff --git a/website/versioned_docs/version-0.86/_getting-started-macos-android.md b/website/versioned_docs/version-0.86/_getting-started-macos-android.md
new file mode 100644
index 00000000000..031dd7655a4
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_getting-started-macos-android.md
@@ -0,0 +1,142 @@
+## Installing dependencies
+
+You will need Node, Watchman, the React Native command line interface, a JDK, and Android Studio.
+
+While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.
+
+
Node & Watchman
+
+We recommend installing Node and Watchman using [Homebrew](https://brew.sh/). Run the following commands in a Terminal after installing Homebrew:
+
+```shell
+brew install node
+brew install watchman
+```
+
+If you have already installed Node on your system, make sure it is Node 22.11.0 or newer.
+
+[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
+
+
Java Development Kit
+
+We recommend installing the OpenJDK distribution called Azul **Zulu** using [Homebrew](https://brew.sh/). Run the following commands in a Terminal after installing Homebrew:
+
+```shell
+brew install --cask zulu@17
+
+# Get path to where cask was installed to find the JDK installer
+brew info --cask zulu@17
+
+# ==> zulu@17:
+# https://www.azul.com/downloads/
+# Installed
+# /opt/homebrew/Caskroom/zulu@17/ (185.8MB) (note that the path is /usr/local/Caskroom on non-Apple Silicon Macs)
+# Installed using the formulae.brew.sh API on 2024-06-06 at 10:00:00
+
+# Navigate to the folder
+open /opt/homebrew/Caskroom/zulu@17/ # or /usr/local/Caskroom/zulu@17/
+```
+
+After opening Finder, double click the `Double-Click to Install Azul Zulu JDK 17.pkg` package to install the JDK.
+
+After the JDK installation, add or update your `JAVA_HOME` environment variable in `~/.zshrc` (or in `~/.bash_profile`).
+
+If you used above steps, JDK will likely be located at `/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home`:
+
+```shell
+export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
+```
+
+The Zulu OpenJDK distribution offers JDKs for **both Intel and M1 Macs**. This will make sure your builds are faster on M1 Macs compared to using an Intel-based JDK.
+
+If you have already installed JDK on your system, we recommend JDK 17. You may encounter problems using higher JDK versions.
+
+
Android development environment
+
+Setting up your development environment can be somewhat tedious if you're new to Android development. If you're already familiar with Android development, there are a few things you may need to configure. In either case, please make sure to carefully follow the next few steps.
+
+
1. Install Android Studio
+
+[Download and install Android Studio](https://developer.android.com/studio). While on Android Studio installation wizard, make sure the boxes next to all of the following items are checked:
+
+- `Android SDK`
+- `Android SDK Platform`
+- `Android Virtual Device`
+
+Then, click "Next" to install all of these components.
+
+:::note
+If the checkboxes are grayed out, you will have a chance to install these components later on.
+:::
+
+Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
+
+
2. Install the Android SDK
+
+Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the `Android 15 (VanillaIceCream)` SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.
+
+To do that, open Android Studio, click on "More Actions" button and select "SDK Manager".
+
+
+
+:::tip
+The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
+:::
+
+Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 15 (VanillaIceCream)` entry, then make sure the following items are checked:
+
+- `Android SDK Platform 35`
+- `Intel x86 Atom_64 System Image` or `Google APIs Intel x86 Atom System Image` or (for Apple M1 Silicon) `Google APIs ARM 64 v8a System Image`
+
+Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the "Android SDK Build-Tools" entry, then make sure that `36.0.0` and `Android SDK Command-line Tools (latest)` are selected.
+
+Finally, click "Apply" to download and install the Android SDK and related build tools.
+
+
3. Configure the ANDROID_HOME environment variable
+
+The React Native tools require some environment variables to be set up in order to build apps with native code.
+
+Add the following lines to your `~/.zprofile` or `~/.zshrc` (if you are using `bash`, then `~/.bash_profile` or `~/.bashrc`) config file:
+
+```shell
+export ANDROID_HOME=$HOME/Library/Android/sdk
+export PATH=$PATH:$ANDROID_HOME/emulator
+export PATH=$PATH:$ANDROID_HOME/platform-tools
+```
+
+Run `source ~/.zprofile` (or `source ~/.bash_profile` for `bash`) to load the config into your current shell. Verify that ANDROID_HOME has been set by running `echo $ANDROID_HOME` and the appropriate directories have been added to your path by running `echo $PATH`.
+
+:::note
+Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
+:::
+
+
Preparing the Android device
+
+You will need an Android device to run your React Native Android app. This can be either a physical Android device, or more commonly, you can use an Android Virtual Device which allows you to emulate an Android device on your computer.
+
+Either way, you will need to prepare the device to run Android apps for development.
+
+
Using a physical device
+
+If you have a physical Android device, you can use it for development in place of an AVD by plugging it in to your computer using a USB cable and following the instructions [here](running-on-device.md).
+
+
Using a virtual device
+
+If you use Android Studio to open `./AwesomeProject/android`, you can see the list of available Android Virtual Devices (AVDs) by opening the "AVD Manager" from within Android Studio. Look for an icon that looks like this:
+
+
+
+If you have recently installed Android Studio, you will likely need to [create a new AVD](https://developer.android.com/studio/run/managing-avds.html). Select "Create Virtual Device...", then pick any Phone from the list and click "Next", then select the **VanillaIceCream** API Level 35 image.
+
+Click "Next" then "Finish" to create your AVD. At this point you should be able to click on the green triangle button next to your AVD to launch it.
+
+
That's it!
+
+Congratulations! You successfully set up your development environment.
+
+
+
+
Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
diff --git a/website/versioned_docs/version-0.86/_getting-started-macos-ios.md b/website/versioned_docs/version-0.86/_getting-started-macos-ios.md
new file mode 100644
index 00000000000..84204758fb3
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_getting-started-macos-ios.md
@@ -0,0 +1,73 @@
+## Installing dependencies
+
+You will need Node, Watchman, the React Native command line interface, Xcode and CocoaPods.
+
+While you can use any editor of your choice to develop your app, you will need to install Xcode in order to set up the necessary tooling to build your React Native app for iOS.
+
+### Node & Watchman
+
+We recommend installing Node and Watchman using [Homebrew](https://brew.sh/). Run the following commands in a Terminal after installing Homebrew:
+
+```shell
+brew install node
+brew install watchman
+```
+
+If you have already installed Node on your system, make sure it is Node 22.11.0 or newer.
+
+[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
+
+### Xcode
+
+Please use the **latest version** of Xcode.
+
+The easiest way to install Xcode is via the [Mac App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12). Installing Xcode will also install the iOS Simulator and all the necessary tools to build your iOS app.
+
+#### Command Line Tools
+
+You will also need to install the Xcode Command Line Tools. Open Xcode, then choose **Settings... (or Preferences...)** from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.
+
+
+
+#### Installing an iOS Simulator in Xcode
+
+To install a simulator, open **Xcode > Settings... (or Preferences...)** and select the **Platforms (or Components)** tab. Select a simulator with the corresponding version of iOS you wish to use.
+
+If you are using Xcode version 14.0 or greater to install a simulator, open **Xcode > Settings > Platforms** tab, then click "+" icon and select **iOS…** option.
+
+#### CocoaPods
+
+[CocoaPods](https://cocoapods.org/) is one of the dependency management system available for iOS. CocoaPods is a Ruby [gem](https://en.wikipedia.org/wiki/RubyGems). You can install CocoaPods using the version of Ruby that ships with the latest version of macOS.
+
+For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
+
+### [Optional] Configuring your environment
+
+Starting from React Native version 0.69, it is possible to configure the Xcode environment using the `.xcode.env` file provided by the template.
+
+The `.xcode.env` file contains an environment variable to export the path to the `node` executable in the `NODE_BINARY` variable.
+This is the **suggested approach** to decouple the build infrastructure from the system version of `node`. You should customize this variable with your own path or your own `node` version manager, if it differs from the default.
+
+On top of this, it's possible to add any other environment variable and to source the `.xcode.env` file in your build script phases. If you need to run script that requires some specific environment, this is the **suggested approach**: it allows to decouple the build phases from a specific environment.
+
+:::info
+If you are already using [NVM](https://nvm.sh/) (a command which helps you install and switch between versions of Node.js) and [zsh](https://ohmyz.sh/), you might want to move the code that initialize NVM from your `~/.zshrc` into a `~/.zshenv` file to help Xcode find your Node executable:
+
+```zsh
+export NVM_DIR="$HOME/.nvm"
+[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
+```
+
+You might also want to ensure that all "shell script build phase" of your Xcode project, is using `/bin/zsh` as its shell.
+:::
+
+
That's it!
+
+Congratulations! You successfully set up your development environment.
+
+
+
+
Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
diff --git a/website/versioned_docs/version-0.86/_getting-started-windows-android.md b/website/versioned_docs/version-0.86/_getting-started-windows-android.md
new file mode 100644
index 00000000000..c04c9b74c35
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_getting-started-windows-android.md
@@ -0,0 +1,146 @@
+
Installing dependencies
+
+You will need Node, the React Native command line interface, a JDK, and Android Studio.
+
+While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.
+
+
Node, JDK
+
+We recommend installing Node via [Chocolatey](https://chocolatey.org/install), a popular package manager for Windows.
+
+It is recommended to use an LTS version of Node. If you want to be able to switch between different versions, you might want to install Node via [nvm-windows](https://github.com/coreybutler/nvm-windows), a Node version manager for Windows.
+
+React Native also requires [Java SE Development Kit (JDK)](https://openjdk.java.net/projects/jdk/17/), which can be installed using Chocolatey as well.
+
+Open an Administrator Command Prompt (right click Command Prompt and select "Run as Administrator"), then run the following command:
+
+```powershell
+choco install -y nodejs-lts microsoft-openjdk17
+```
+
+If you have already installed Node on your system, make sure it is Node 22.11.0 or newer. If you already have a JDK on your system, we recommend JDK17. You may encounter problems using higher JDK versions.
+
+:::note
+You can find additional installation options on [Node's Downloads page](https://nodejs.org/en/download/).
+:::
+
+:::info
+If you're using the latest version of Java Development Kit, you'll need to change the Gradle version of your project so it can recognize the JDK. You can do that by going to `{project root folder}\android\gradle\wrapper\gradle-wrapper.properties` and changing the `distributionUrl` value to upgrade the Gradle version. You can check out [here the latest releases of Gradle](https://gradle.org/releases/).
+:::
+
+
Android development environment
+
+Setting up your development environment can be somewhat tedious if you're new to Android development. If you're already familiar with Android development, there are a few things you may need to configure. In either case, please make sure to carefully follow the next few steps.
+
+
1. Install Android Studio
+
+[Download and install Android Studio](https://developer.android.com/studio). While on Android Studio installation wizard, make sure the boxes next to all of the following items are checked:
+
+- `Android SDK`
+- `Android SDK Platform`
+- `Android Virtual Device`
+- If you are not already using Hyper-V: `Performance (Intel ® HAXM)` ([See here for AMD or Hyper-V](https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html))
+
+Then, click "Next" to install all of these components.
+
+:::note
+If the checkboxes are grayed out, you will have a chance to install these components later on.
+:::
+
+Once setup has finalized and you're presented with the Welcome screen, proceed to the next step.
+
+
2. Install the Android SDK
+
+Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the `Android 15 (VanillaIceCream)` SDK in particular. Additional Android SDKs can be installed through the SDK Manager in Android Studio.
+
+To do that, open Android Studio, click on "More Actions" button and select "SDK Manager".
+
+
+
+:::tip
+The SDK Manager can also be found within the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
+:::
+
+Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the `Android 15 (VanillaIceCream)` entry, then make sure the following items are checked:
+
+- `Android SDK Platform 35`
+- `Intel x86 Atom_64 System Image` or `Google APIs Intel x86 Atom System Image`
+
+Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the `Android SDK Build-Tools` entry, then make sure that `36.0.0` and `Android SDK Command-line Tools (latest)` are selected.
+
+Finally, click "Apply" to download and install the Android SDK and related build tools.
+
+
3. Configure the ANDROID_HOME environment variable
+
+The React Native tools require some environment variables to be set up in order to build apps with native code.
+
+1. Open the **Windows Control Panel.**
+2. Click on **User Accounts,** then click **User Accounts** again
+3. Click on **Change my environment variables**
+4. Click on **New...** to create a new `ANDROID_HOME` user variable that points to the path to your Android SDK:
+
+
+
+The SDK is installed, by default, at the following location:
+
+```powershell
+%LOCALAPPDATA%\Android\Sdk
+```
+
+You can find the actual location of the SDK in the Android Studio "Settings" dialog, under **Languages & Frameworks** → **Android SDK**.
+
+Open a new Command Prompt window to ensure the new environment variable is loaded before proceeding to the next step.
+
+1. Open powershell
+2. Copy and paste **Get-ChildItem -Path Env:\\** into powershell
+3. Verify `ANDROID_HOME` has been added
+
+
4. Add platform-tools to Path
+
+1. Open the **Windows Control Panel.**
+2. Click on **User Accounts,** then click **User Accounts** again
+3. Click on **Change my environment variables**
+4. Select the **Path** variable.
+5. Click **Edit.**
+6. Click **New** and add the path to platform-tools to the list.
+
+The default location for this folder is:
+
+```powershell
+%LOCALAPPDATA%\Android\Sdk\platform-tools
+```
+
+
Preparing the Android device
+
+You will need an Android device to run your React Native Android app. This can be either a physical Android device, or more commonly, you can use an Android Virtual Device which allows you to emulate an Android device on your computer.
+
+Either way, you will need to prepare the device to run Android apps for development.
+
+
Using a physical device
+
+If you have a physical Android device, you can use it for development in place of an AVD by plugging it in to your computer using a USB cable and following the instructions [here](running-on-device.md).
+
+
Using a virtual device
+
+If you use Android Studio to open `./AwesomeProject/android`, you can see the list of available Android Virtual Devices (AVDs) by opening the "AVD Manager" from within Android Studio. Look for an icon that looks like this:
+
+
+
+If you have recently installed Android Studio, you will likely need to [create a new AVD](https://developer.android.com/studio/run/managing-avds.html). Select "Create Virtual Device...", then pick any Phone from the list and click "Next", then select the **VanillaIceCream** API Level 35 image.
+
+:::note
+If you don't have HAXM installed, click on "Install HAXM" or follow [these instructions](https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows) to set it up, then go back to the AVD Manager.
+:::
+
+Click "Next" then "Finish" to create your AVD. At this point you should be able to click on the green triangle button next to your AVD to launch it.
+
+
That's it!
+
+Congratulations! You successfully set up your development environment.
+
+
+
+
Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
diff --git a/website/versioned_docs/version-0.86/_integration-with-existing-apps-ios.md b/website/versioned_docs/version-0.86/_integration-with-existing-apps-ios.md
new file mode 100644
index 00000000000..4b95571538b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_integration-with-existing-apps-ios.md
@@ -0,0 +1,655 @@
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import constants from '@site/core/TabsConstants';
+import CodeBlock from '@theme/CodeBlock';
+import RNTemplateRepoLink from '@site/core/RNTemplateRepoLink';
+import {getTemplateBranchNameForCurrentVersion} from '@site/src/getTemplateBranchNameForCurrentVersion';
+
+## Key Concepts
+
+The keys to integrating React Native components into your iOS application are to:
+
+1. Set up the correct directory structure.
+2. Install the necessary NPM dependencies.
+3. Adding React Native to your Podfile configuration.
+4. Writing the TypeScript code for your first React Native screen.
+5. Integrate React Native with your iOS code using a `RCTRootView`.
+6. Testing your integration by running the bundler and seeing your app in action.
+
+## Using the Community Template
+
+While you follow this guide, we suggest you to use the [React Native Community Template](https://github.com/react-native-community/template/) as reference. The template contains a **minimal iOS app** and will help you understanding how to integrate React Native into an existing iOS app.
+
+## Prerequisites
+
+Follow the guide on [setting up your development environment](set-up-your-environment) and using [React Native without a framework](getting-started-without-a-framework) to configure your development environment for building React Native apps for iOS.
+This guide also assumes you're familiar with the basics of iOS development such as creating a `UIViewController` and editing the `Podfile` file.
+
+### 1. Set up directory structure
+
+To ensure a smooth experience, create a new folder for your integrated React Native project, then **move your existing iOS project** to the `/ios` subfolder.
+
+## 2. Install NPM dependencies
+
+Go to the root directory and run the following command:
+
+
+{`curl -O https://raw.githubusercontent.com/react-native-community/template/refs/heads/${getTemplateBranchNameForCurrentVersion()}/template/package.json`}
+
+
+This will copy the `package.json` file from the Community template to your project.
+
+Next, install the NPM packages by running:
+
+
+
+
+```shell
+npm install
+```
+
+
+
+
+```shell
+yarn install
+```
+
+
+
+
+Installation process has created a new `node_modules` folder. This folder stores all the JavaScript dependencies required to build your project.
+
+Add `node_modules/` to your `.gitignore` file (here the Community default one).
+
+### 3. Install Development tools
+
+### Command Line Tools for Xcode
+
+Install the Command Line Tools. Choose **Settings... (or Preferences...)** in the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.
+
+
+
+### CocoaPods
+
+[CocoaPods](https://cocoapods.org) is a package management tool for iOS and macOS development. We use it to add the actual React Native framework code locally into your current project.
+
+We recommend installing CocoaPods using [Homebrew](https://brew.sh/):
+
+```shell
+brew install cocoapods
+```
+
+## 4. Adding React Native to your app
+
+### Configuring CocoaPods
+
+To configure CocoaPods, we need two files:
+
+- A **Gemfile** that defines which Ruby dependencies we need.
+- A **Podfile** that defines how to properly install our dependencies.
+
+For the **Gemfile**, go to the root directory of your project and run this command
+
+
+{`curl -O https://raw.githubusercontent.com/react-native-community/template/refs/heads/${getTemplateBranchNameForCurrentVersion()}/template/Gemfile`}
+
+
+This will download the Gemfile from the template.
+
+:::note
+If you created your project with Xcode 16, you need to update the Gemfile as it follows:
+
+```diff
+-gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
++gem 'cocoapods', '1.16.2'
+gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
+-gem 'xcodeproj', '< 1.26.0'
++gem 'xcodeproj', '1.27.0'
+```
+
+Xcode 16 generates a project in a slightly different ways from previous versions of Xcode, and you need the latest CocoaPods and Xcodeproj gems to make it work properly.
+:::
+
+Similarly, for the **Podfile**, go to the `ios` folder of your project and run
+
+
+{`curl -O https://raw.githubusercontent.com/react-native-community/template/refs/heads/${getTemplateBranchNameForCurrentVersion()}/template/ios/Podfile`}
+
+
+Please use the Community Template as a reference point for the Gemfile and for the Podfile.
+
+:::note
+Remember to change this line.
+:::
+
+Now, we need to run a couple of extra commands to install the Ruby gems and the Pods.
+Navigate to the `ios` folder and run the following commands:
+
+```sh
+bundle install
+bundle exec pod install
+```
+
+The first command will install the Ruby dependencies and the second command will actually integrate the React Native code in your application so that your iOS files can import the React Native headers.
+
+## 5. Writing the TypeScript Code
+
+Now we will actually modify the native iOS application to integrate React Native.
+
+The first bit of code we will write is the actual React Native code for the new screen that will be integrated into our application.
+
+### Create a `index.js` file
+
+First, create an empty `index.js` file in the root of your React Native project.
+
+`index.js` is the starting point for React Native applications, and it is always required. It can be a small file that `import`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it.
+
+Our `index.js` should look as follows (here the Community template file as reference):
+
+```js
+import {AppRegistry} from 'react-native';
+import App from './App';
+
+AppRegistry.registerComponent('HelloWorld', () => App);
+```
+
+### Create a `App.tsx` file
+
+Let's create an `App.tsx` file. This is a [TypeScript](https://www.typescriptlang.org/) file that can have [JSX]() expressions. It contains the root React Native component that we will integrate into our iOS application (link):
+
+```tsx
+import React from 'react';
+import {
+ SafeAreaView,
+ ScrollView,
+ StatusBar,
+ StyleSheet,
+ Text,
+ useColorScheme,
+ View,
+} from 'react-native';
+
+import {
+ Colors,
+ DebugInstructions,
+ Header,
+ ReloadInstructions,
+} from 'react-native/Libraries/NewAppScreen';
+
+function App(): React.JSX.Element {
+ const isDarkMode = useColorScheme() === 'dark';
+
+ const backgroundStyle = {
+ backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
+ };
+
+ return (
+
+
+
+
+
+ Step One
+
+ Edit App.tsx to
+ change this screen and see your edits.
+
+ See your changes
+
+ Debug
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ title: {
+ fontSize: 24,
+ fontWeight: '600',
+ },
+ bold: {
+ fontWeight: '700',
+ },
+});
+
+export default App;
+```
+
+Here is the Community template file as reference.
+
+## 5. Integrating with your iOS code
+
+We now need to add some native code in order to start the React Native runtime and tell it to render our React components.
+
+### Requirements
+
+React Native initialization is now unbound to any specific part of an iOS app.
+
+React Native can be initialized using a class called `RCTReactNativeFactory`, that takes care of handling the React Native lifecycle for you.
+
+Once the class is initialized, you can either start a React Native view providing a `UIWindow` object, or you can ask for the factory to generate a `UIView` that you can load in any `UIViewController.`
+
+In the following example, we will create a ViewController that can load a React Native view as it's `view`.
+
+#### Create the ReactViewController
+
+Create a new file from template (⌘+N) and choose the Cocoa Touch Class template.
+
+Make sure to select `UIViewController` as the "Subclass of" field.
+
+
+
+
+Now open the `ReactViewController.m` file and apply the following changes
+
+```diff title="ReactViewController.m"
+#import "ReactViewController.h"
++#import
++#import
++#import
++#import
+
+
+@interface ReactViewController ()
+
+@end
+
++@interface ReactNativeFactoryDelegate: RCTDefaultReactNativeFactoryDelegate
++@end
+
+-@implementation ReactViewController
++@implementation ReactViewController {
++ RCTReactNativeFactory *_factory;
++ id _factoryDelegate;
++}
+
+ - (void)viewDidLoad {
+ [super viewDidLoad];
+ // Do any additional setup after loading the view.
++ _factoryDelegate = [ReactNativeFactoryDelegate new];
++ _factoryDelegate.dependencyProvider = [RCTAppDependencyProvider new];
++ _factory = [[RCTReactNativeFactory alloc] initWithDelegate:_factoryDelegate];
++ self.view = [_factory.rootViewFactory viewWithModuleName:@"HelloWorld"];
+ }
+
+@end
+
++@implementation ReactNativeFactoryDelegate
++
++- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
++{
++ return [self bundleURL];
++}
++
++- (NSURL *)bundleURL
++{
++#if DEBUG
++ return [RCTBundleURLProvider.sharedSettings jsBundleURLForBundleRoot:@"index"];
++#else
++ return [NSBundle.mainBundle URLForResource:@"main" withExtension:@"jsbundle"];
++#endif
++}
+
+@end
+
+```
+
+
+
+
+Now open the `ReactViewController.swift` file and apply the following changes
+
+```diff title="ReactViewController.swift"
+import UIKit
++import React
++import React_RCTAppDelegate
++import ReactAppDependencyProvider
+
+class ReactViewController: UIViewController {
++ var reactNativeFactory: RCTReactNativeFactory?
++ var reactNativeFactoryDelegate: RCTReactNativeFactoryDelegate?
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
++ reactNativeFactoryDelegate = ReactNativeDelegate()
++ reactNativeFactoryDelegate!.dependencyProvider = RCTAppDependencyProvider()
++ reactNativeFactory = RCTReactNativeFactory(delegate: reactNativeFactoryDelegate!)
++ view = reactNativeFactory!.rootViewFactory.view(withModuleName: "HelloWorld")
+
+ }
+}
+
++class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
++ override func sourceURL(for bridge: RCTBridge) -> URL? {
++ self.bundleURL()
++ }
++
++ override func bundleURL() -> URL? {
++ #if DEBUG
++ RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
++ #else
++ Bundle.main.url(forResource: "main", withExtension: "jsbundle")
++ #endif
++ }
++
++}
+```
+
+
+
+
+#### Presenting a React Native view in a rootViewController
+
+Finally, we can present our React Native view. To do so, we need a new View Controller that can host a view in which we can load the JS content.
+We already have the initial `ViewController`, and we can make it present the `ReactViewController`. There are several ways to do so, depending on your app. For this example, we assume that you have a button that presents React Native modally.
+
+
+
+
+```diff title="ViewController.m"
+#import "ViewController.h"
++#import "ReactViewController.h"
+
+@interface ViewController ()
+
+@end
+
+- @implementation ViewController
++@implementation ViewController {
++ ReactViewController *reactViewController;
++}
+
+ - (void)viewDidLoad {
+ [super viewDidLoad];
+ // Do any additional setup after loading the view.
+ self.view.backgroundColor = UIColor.systemBackgroundColor;
++ UIButton *button = [UIButton new];
++ [button setTitle:@"Open React Native" forState:UIControlStateNormal];
++ [button setTitleColor:UIColor.systemBlueColor forState:UIControlStateNormal];
++ [button setTitleColor:UIColor.blueColor forState:UIControlStateHighlighted];
++ [button addTarget:self action:@selector(presentReactNative) forControlEvents:UIControlEventTouchUpInside];
++ [self.view addSubview:button];
+
++ button.translatesAutoresizingMaskIntoConstraints = NO;
++ [NSLayoutConstraint activateConstraints:@[
++ [button.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
++ [button.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
++ [button.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor],
++ [button.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor],
++ ]];
+ }
+
++- (void)presentReactNative
++{
++ if (reactViewController == NULL) {
++ reactViewController = [ReactViewController new];
++ }
++ [self presentViewController:reactViewController animated:YES];
++}
+
+@end
+```
+
+
+
+
+```diff title="ViewController.swift"
+import UIKit
+
+class ViewController: UIViewController {
+
++ var reactViewController: ReactViewController?
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ self.view.backgroundColor = .systemBackground
+
++ let button = UIButton()
++ button.setTitle("Open React Native", for: .normal)
++ button.setTitleColor(.systemBlue, for: .normal)
++ button.setTitleColor(.blue, for: .highlighted)
++ button.addAction(UIAction { [weak self] _ in
++ guard let self else { return }
++ if reactViewController == nil {
++ reactViewController = ReactViewController()
++ }
++ present(reactViewController!, animated: true)
++ }, for: .touchUpInside)
++ self.view.addSubview(button)
++
++ button.translatesAutoresizingMaskIntoConstraints = false
++ NSLayoutConstraint.activate([
++ button.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
++ button.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
++ button.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
++ button.centerYAnchor.constraint(equalTo: self.view.centerYAnchor),
++ ])
+ }
+}
+```
+
+
+
+
+Make sure to disable the Sandbox scripting. To achieve this, in Xcode, click on your app, then on build settings. Filter for script and set the `User Script Sandboxing` to `NO`. This step is needed to properly switch between the Debug and Release version of the [Hermes engine](https://github.com/facebook/hermes/blob/main/README.md) that we ship with React Native.
+
+
+
+Finally, make sure to add the `UIViewControllerBasedStatusBarAppearance` key into your `Info.plist` file, with value of `NO`.
+
+
+
+## 6. Test your integration
+
+You have completed all the basic steps to integrate React Native with your application. Now we will start the [Metro bundler](https://metrobundler.dev/) to build your TypeScript application code into a bundle. Metro's HTTP server shares the bundle from `localhost` on your developer environment to a simulator or device. This allows for [hot reloading](https://reactnative.dev/blog/2016/03/24/introducing-hot-reloading).
+
+First, you need to create a `metro.config.js` file in the root of your project as follows:
+
+```js
+const {getDefaultConfig} = require('@react-native/metro-config');
+module.exports = getDefaultConfig(__dirname);
+```
+
+You can checkout the `metro.config.js` file from the Community template file as reference.
+
+Then, you need to create a `.watchmanconfig` file in the root of your project. The file must contain an empty json object:
+
+```sh
+echo {} > .watchmanconfig
+```
+
+Once you have the configuration file in place, you can run the bundler. Run the following command in the root directory of your project:
+
+
+
+
+```shell
+npm start
+```
+
+
+
+
+```shell
+yarn start
+```
+
+
+
+
+Now build and run your iOS app as normal.
+
+Once you reach your React-powered Activity inside the app, it should load the JavaScript code from the development server and display:
+
+
+
+### Creating a release build in Xcode
+
+You can use Xcode to create your release builds too! The only additional step is to add a script that is executed when the app is built to package your JS and images into the iOS application.
+
+1. In Xcode, select your application
+2. Click on `Build Phases`
+3. Click on the `+` in the top left corner and select `New Run Script Phase`
+4. Click on the `Run Script` line and rename the Script to `Bundle React Native code and images`
+5. Paste in the text box the following script
+
+```sh title="Build React Native code and image"
+set -e
+
+WITH_ENVIRONMENT="$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
+REACT_NATIVE_XCODE="$REACT_NATIVE_PATH/scripts/react-native-xcode.sh"
+
+/bin/sh -c "$WITH_ENVIRONMENT $REACT_NATIVE_XCODE"
+```
+
+6. Drag and drop the script before the one called `[CP] Embed Pods Frameworks`.
+
+Now, if you build your app for Release, it will work as expected.
+
+## 7. Passing initial props to the React Native view
+
+In some case, you'd like to pass some information from the Native app to JavaScript. For example, you might want to pass the user id of the currently logged user to React Native, together with a token that can be used to retrieve information from a database.
+
+This is possible by using the `initialProperties` parameter of the `view(withModuleName:initialProperty)` overload of the `RCTReactNativeFactory` class. The following steps shows you how to do it.
+
+### Update the App.tsx file to read the initial properties.
+
+Open the `App.tsx` file and add the following code:
+
+```diff title="App.tsx"
+import {
+ Colors,
+ DebugInstructions,
+ Header,
+ ReloadInstructions,
+} from 'react-native/Libraries/NewAppScreen';
+
+-function App(): React.JSX.Element {
++function App(props): React.JSX.Element {
+ const isDarkMode = useColorScheme() === 'dark';
+
+ const backgroundStyle = {
+ backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
+ };
+
+ return (
+
+
+
+
+-
+- Step One
+-
+- Edit App.tsx to
+- change this screen and see your edits.
+-
+- See your changes
+-
+- Debug
+-
++ UserID: {props.userID}
++ Token: {props.token}
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ title: {
+ fontSize: 24,
+ fontWeight: '600',
++ marginLeft: 20,
+ },
+ bold: {
+ fontWeight: '700',
+ },
+});
+
+export default App;
+```
+
+These changes will tell React Native that your App component is now accepting some properties. The `RCTreactNativeFactory` will take care of passing them to the component when it's rendered.
+
+### Update the Native code to pass the initial properties to JavaScript.
+
+
+
+
+Modify the `ReactViewController.mm` to pass the initial properties to JavaScript.
+
+```diff title="ReactViewController.mm"
+ - (void)viewDidLoad {
+ [super viewDidLoad];
+ // Do any additional setup after loading the view.
+
+ _factoryDelegate = [ReactNativeFactoryDelegate new];
+ _factoryDelegate.dependencyProvider = [RCTAppDependencyProvider new];
+ _factory = [[RCTReactNativeFactory alloc] initWithDelegate:_factoryDelegate];
+- self.view = [_factory.rootViewFactory viewWithModuleName:@"HelloWorld"];
++ self.view = [_factory.rootViewFactory viewWithModuleName:@"HelloWorld" initialProperties:@{
++ @"userID": @"12345678",
++ @"token": @"secretToken"
++ }];
+}
+```
+
+
+
+
+Modify the `ReactViewController.swift` to pass the initial properties to the React Native view.
+
+```diff title="ReactViewController.swift"
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ reactNativeFactoryDelegate = ReactNativeDelegate()
+ reactNativeFactoryDelegate!.dependencyProvider = RCTAppDependencyProvider()
+ reactNativeFactory = RCTReactNativeFactory(delegate: reactNativeFactoryDelegate!)
+- view = reactNativeFactory!.rootViewFactory.view(withModuleName: "HelloWorld")
++ view = reactNativeFactory!.rootViewFactory.view(withModuleName: "HelloWorld" initialProperties: [
++ "userID": "12345678",
++ "token": "secretToken"
++])
+
+ }
+}
+```
+
+
+
+
+3. Run your app once again. You should see the following screen after you present the `ReactViewController`:
+
+
+
+
+
+## Now what?
+
+At this point you can continue developing your app as usual. Refer to our [debugging](debugging) and [deployment](running-on-device) docs to learn more about working with React Native.
diff --git a/website/versioned_docs/version-0.86/_integration-with-existing-apps-kotlin.md b/website/versioned_docs/version-0.86/_integration-with-existing-apps-kotlin.md
new file mode 100644
index 00000000000..23414c63a3b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_integration-with-existing-apps-kotlin.md
@@ -0,0 +1,511 @@
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import constants from '@site/core/TabsConstants';
+import CodeBlock from '@theme/CodeBlock';
+import RNTemplateRepoLink from '@site/core/RNTemplateRepoLink';
+import {getTemplateBranchNameForCurrentVersion} from '@site/src/getTemplateBranchNameForCurrentVersion';
+
+## Key Concepts
+
+The keys to integrating React Native components into your Android application are to:
+
+1. Set up the correct directory structure.
+2. Install the necessary NPM dependencies.
+3. Adding React Native to your Gradle configuration.
+4. Writing the TypeScript code for your first React Native screen.
+5. Integrate React Native with your Android code using a ReactActivity.
+6. Testing your integration by running the bundler and seeing your app in action.
+
+## Using the Community Template
+
+While you follow this guide, we suggest you to use the [React Native Community Template](https://github.com/react-native-community/template/) as reference. The template contains a **minimal Android app** and will help you understanding how to integrate React Native into an existing Android app.
+
+## Prerequisites
+
+Follow the guide on [setting up your development environment](set-up-your-environment) and using [React Native without a framework](getting-started-without-a-framework) to configure your development environment for building React Native apps for Android.
+This guide also assumes you're familiar with the basics of Android development such as creating Activities and editing the `AndroidManifest.xml` file.
+
+## 1. Set up directory structure
+
+To ensure a smooth experience, create a new folder for your integrated React Native project, then **move your existing Android project** to the `/android` subfolder.
+
+## 2. Install NPM dependencies
+
+Go to the root directory and run the following command:
+
+
+{`curl -O https://raw.githubusercontent.com/react-native-community/template/refs/heads/${getTemplateBranchNameForCurrentVersion()}/template/package.json`}
+
+
+This will copy the `package.json` file from the Community template to your project.
+
+Next, install the NPM packages by running:
+
+
+
+
+```shell
+npm install
+```
+
+
+
+
+```shell
+yarn install
+```
+
+
+
+
+Installation process has created a new `node_modules` folder. This folder stores all the JavaScript dependencies required to build your project.
+
+Add `node_modules/` to your `.gitignore` file (here the Community default one).
+
+## 3. Adding React Native to your app
+
+### Configuring Gradle
+
+React Native uses the React Native Gradle Plugin to configure your dependencies and project setup.
+
+First, let's edit your `settings.gradle` file by adding those lines (as suggested from the Community template):
+
+```groovy
+// Configures the React Native Gradle Settings plugin used for autolinking
+pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
+plugins { id("com.facebook.react.settings") }
+extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
+// If using .gradle.kts files:
+// extensions.configure { autolinkLibrariesFromCommand() }
+includeBuild("../node_modules/@react-native/gradle-plugin")
+
+// Include your existing Gradle modules here.
+// include(":app")
+```
+
+Then you need to open your top level `build.gradle` and include this line (as suggested from the Community template):
+
+```diff
+buildscript {
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath("com.android.tools.build:gradle:7.3.1")
++ classpath("com.facebook.react:react-native-gradle-plugin")
+ }
+}
+```
+
+This makes sure the React Native Gradle Plugin (RNGP) is available inside your project.
+Finally, add those lines inside your Applications's `build.gradle` file (it's a different `build.gradle` file usually inside your `app` folder - you can use the Community template file as reference):
+
+```diff
+apply plugin: "com.android.application"
++apply plugin: "com.facebook.react"
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ // Other dependencies here
++ // Note: we intentionally don't specify the version number here as RNGP will take care of it.
++ // If you don't use the RNGP, you'll have to specify version manually.
++ implementation("com.facebook.react:react-android")
++ implementation("com.facebook.react:hermes-android")
+}
+
++react {
++ // Needed to enable Autolinking - https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
++ autolinkLibrariesWithApp()
++}
+```
+
+Finally, open your application `gradle.properties` files and add the following line (here the Community template file as reference):
+
+```diff
++reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
++newArchEnabled=true
++hermesEnabled=true
+```
+
+### Configuring your manifest
+
+First, make sure you have the Internet permission in your `AndroidManifest.xml`:
+
+```diff
+
+
++
+
+
+
+
+```
+
+Then you need to enable [cleartext traffic](https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted) in your **debug** `AndroidManifest.xml`:
+
+```diff
+
+
+
+
+
+```
+
+As usual, here the AndroidManifest.xml file from the Community template to use as a reference: main and debug.
+
+This is needed as your application will communicate with your local bundler, [Metro](https://metrobundler.dev/), via HTTP.
+
+Make sure you add this only to your **debug** manifest.
+
+## 4. Writing the TypeScript Code
+
+Now we will actually modify the native Android application to integrate React Native.
+
+The first bit of code we will write is the actual React Native code for the new screen that will be integrated into our application.
+
+### Create a `index.js` file
+
+First, create an empty `index.js` file in the root of your React Native project.
+
+`index.js` is the starting point for React Native applications, and it is always required. It can be a small file that `import`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it.
+
+Our index.js should look as follows (here the Community template file as reference):
+
+```js
+import {AppRegistry} from 'react-native';
+import App from './App';
+
+AppRegistry.registerComponent('HelloWorld', () => App);
+```
+
+### Create a `App.tsx` file
+
+Let's create an `App.tsx` file. This is a [TypeScript](https://www.typescriptlang.org/) file that can have [JSX]() expressions. It contains the root React Native component that we will integrate into our Android application (link):
+
+```tsx
+import React from 'react';
+import {
+ SafeAreaView,
+ ScrollView,
+ StatusBar,
+ StyleSheet,
+ Text,
+ useColorScheme,
+ View,
+} from 'react-native';
+
+import {
+ Colors,
+ DebugInstructions,
+ Header,
+ ReloadInstructions,
+} from 'react-native/Libraries/NewAppScreen';
+
+function App(): React.JSX.Element {
+ const isDarkMode = useColorScheme() === 'dark';
+
+ const backgroundStyle = {
+ backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
+ };
+
+ return (
+
+
+
+
+
+ Step One
+
+ Edit App.tsx to
+ change this screen and see your edits.
+
+ See your changes
+
+ Debug
+
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ title: {
+ fontSize: 24,
+ fontWeight: '600',
+ },
+ bold: {
+ fontWeight: '700',
+ },
+});
+
+export default App;
+```
+
+Here is the Community template file as reference.
+
+## 5. Integrating with your Android code
+
+We now need to add some native code in order to start the React Native runtime and tell it to render our React components.
+
+### Updating your Application class
+
+First, we need to update your `Application` class to properly initialize React Native as follows:
+
+
+
+
+
+```diff
+package ;
+
+import android.app.Application;
++import com.facebook.react.PackageList;
++import com.facebook.react.ReactApplication;
++import com.facebook.react.ReactHost;
++import com.facebook.react.ReactNativeHost;
++import com.facebook.react.ReactPackage;
++import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
++import com.facebook.react.defaults.DefaultReactHost;
++import com.facebook.react.defaults.DefaultReactNativeHost;
++import com.facebook.soloader.SoLoader;
++import com.facebook.react.soloader.OpenSourceMergedSoMapping
++import java.util.List;
+
+-class MainApplication extends Application {
++class MainApplication extends Application implements ReactApplication {
++ @Override
++ public ReactNativeHost getReactNativeHost() {
++ return new DefaultReactNativeHost(this) {
++ @Override
++ protected List getPackages() { return new PackageList(this).getPackages(); }
++ @Override
++ protected String getJSMainModuleName() { return "index"; }
++ @Override
++ public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; }
++ @Override
++ protected boolean isNewArchEnabled() { return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; }
++ @Override
++ protected Boolean isHermesEnabled() { return BuildConfig.IS_HERMES_ENABLED; }
++ };
++ }
+
++ @Override
++ public ReactHost getReactHost() {
++ return DefaultReactHost.getDefaultReactHost(getApplicationContext(), getReactNativeHost());
++ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
++ SoLoader.init(this, OpenSourceMergedSoMapping);
++ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
++ DefaultNewArchitectureEntryPoint.load();
++ }
+ }
+}
+```
+
+
+
+
+
+```diff
+// package
+
+import android.app.Application
++import com.facebook.react.PackageList
++import com.facebook.react.ReactApplication
++import com.facebook.react.ReactHost
++import com.facebook.react.ReactNativeHost
++import com.facebook.react.ReactPackage
++import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
++import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
++import com.facebook.react.defaults.DefaultReactNativeHost
++import com.facebook.soloader.SoLoader
++import com.facebook.react.soloader.OpenSourceMergedSoMapping
+
+-class MainApplication : Application() {
++class MainApplication : Application(), ReactApplication {
+
++ override val reactNativeHost: ReactNativeHost =
++ object : DefaultReactNativeHost(this) {
++ override fun getPackages(): List = PackageList(this).packages
++ override fun getJSMainModuleName(): String = "index"
++ override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
++ override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
++ override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
++ }
+
++ override val reactHost: ReactHost
++ get() = getDefaultReactHost(applicationContext, reactNativeHost)
+
+ override fun onCreate() {
+ super.onCreate()
++ SoLoader.init(this, OpenSourceMergedSoMapping)
++ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
++ load()
++ }
+ }
+}
+```
+
+
+
+
+As usual, here the `MainApplication.kt` Community template file as reference.
+
+#### Creating a `ReactActivity`
+
+Finally, we need to create a new `Activity` that will extend `ReactActivity` and host the React Native code. This activity will be responsible for starting the React Native runtime and rendering the React component.
+
+
+
+
+
+```java
+// package ;
+
+import com.facebook.react.ReactActivity;
+import com.facebook.react.ReactActivityDelegate;
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
+import com.facebook.react.defaults.DefaultReactActivityDelegate;
+
+public class MyReactActivity extends ReactActivity {
+
+ @Override
+ protected String getMainComponentName() {
+ return "HelloWorld";
+ }
+
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate() {
+ return new DefaultReactActivityDelegate(this, getMainComponentName(), DefaultNewArchitectureEntryPoint.getFabricEnabled());
+ }
+}
+```
+
+
+
+
+
+```kotlin
+// package
+
+import com.facebook.react.ReactActivity
+import com.facebook.react.ReactActivityDelegate
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
+import com.facebook.react.defaults.DefaultReactActivityDelegate
+
+class MyReactActivity : ReactActivity() {
+
+ override fun getMainComponentName(): String = "HelloWorld"
+
+ override fun createReactActivityDelegate(): ReactActivityDelegate =
+ DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
+}
+```
+
+
+
+
+As usual, here the `MainActivity.kt` Community template file as reference.
+
+Whenever you create a new Activity, you need to add it to your `AndroidManifest.xml` file. You also need set the theme of `MyReactActivity` to `Theme.AppCompat.Light.NoActionBar` (or to any non-ActionBar theme) as otherwise your application will render an ActionBar on top of your React Native screen:
+
+```diff
+
+
+
+
+
+
++
++
+
+
+```
+
+Now your activity is ready to run some JavaScript code.
+
+## 6. Test your integration
+
+You have completed all the basic steps to integrate React Native with your application. Now we will start the [Metro bundler](https://metrobundler.dev/) to build your TypeScript application code into a bundle. Metro's HTTP server shares the bundle from `localhost` on your developer environment to a simulator or device. This allows for [hot reloading](https://reactnative.dev/blog/2016/03/24/introducing-hot-reloading).
+
+First, you need to create a `metro.config.js` file in the root of your project as follows:
+
+```js
+const {getDefaultConfig} = require('@react-native/metro-config');
+module.exports = getDefaultConfig(__dirname);
+```
+
+You can checkout the `metro.config.js` file from the Community template file as reference.
+
+Once you have the configuration file in place, you can run the bundler. Run the following command in the root directory of your project:
+
+
+
+
+```shell
+npm start
+```
+
+
+
+
+```shell
+yarn start
+```
+
+
+
+
+Now build and run your Android app as normal.
+
+Once you reach your React-powered Activity inside the app, it should load the JavaScript code from the development server and display:
+
+
+
+### Creating a release build in Android Studio
+
+You can use Android Studio to create your release builds too! It’s as quick as creating release builds of your previously-existing native Android app.
+
+The React Native Gradle Plugin will take care of bundling the JS code inside your APK/App Bundle.
+
+If you're not using Android Studio, you can create a release build with:
+
+```
+cd android
+# For a Release APK
+./gradlew :app:assembleRelease
+# For a Release AAB
+./gradlew :app:bundleRelease
+```
+
+### Now what?
+
+At this point you can continue developing your app as usual. Refer to our [debugging](debugging) and [deployment](running-on-device) docs to learn more about working with React Native.
diff --git a/website/versioned_docs/version-0.86/_markdown-new-architecture-warning.mdx b/website/versioned_docs/version-0.86/_markdown-new-architecture-warning.mdx
new file mode 100644
index 00000000000..d52c490153b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_markdown-new-architecture-warning.mdx
@@ -0,0 +1,7 @@
+:::caution
+
+This documentation is still **experimental** and details are subject to changes as we iterate. Feel free to share your feedback on the [discussion inside the working group](https://github.com/reactwg/react-native-new-architecture/discussions/8) for this page.
+
+Moreover, it contains several **manual steps**. Please note that this won't be representative of the final developer experience once the New Architecture is stable. We're working on tools, templates and libraries to help you get started fast on the New Architecture, without having to go through the whole setup.
+
+:::
diff --git a/website/versioned_docs/version-0.86/_remove-global-cli.md b/website/versioned_docs/version-0.86/_remove-global-cli.md
new file mode 100644
index 00000000000..022ba6de2f6
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_remove-global-cli.md
@@ -0,0 +1,8 @@
+:::warning
+If you previously installed a global `react-native-cli` package, please remove it as it may cause unexpected issues:
+
+```shell
+npm uninstall -g react-native-cli @react-native-community/cli
+```
+
+:::
diff --git a/website/versioned_docs/version-0.86/_turbo-native-modules-components.jsx b/website/versioned_docs/version-0.86/_turbo-native-modules-components.jsx
new file mode 100644
index 00000000000..1bb5a1b5edb
--- /dev/null
+++ b/website/versioned_docs/version-0.86/_turbo-native-modules-components.jsx
@@ -0,0 +1,11 @@
+import React from 'react';
+import IOSContent from './turbo-native-modules-ios.md';
+import AndroidContent from './turbo-native-modules-android.md';
+
+export function TurboNativeModulesIOS() {
+ return ;
+}
+
+export function TurboNativeModulesAndroid() {
+ return ;
+}
diff --git a/website/versioned_docs/version-0.86/accessibility.md b/website/versioned_docs/version-0.86/accessibility.md
new file mode 100644
index 00000000000..e9f305964cc
--- /dev/null
+++ b/website/versioned_docs/version-0.86/accessibility.md
@@ -0,0 +1,607 @@
+---
+id: accessibility
+title: Accessibility
+description: Create mobile apps accessible to assistive technology with React Native's suite of APIs designed to work with Android and iOS.
+---
+
+import ExperimentalAPIWarning from './\_experimental-api-warning.mdx';
+
+Both Android and iOS provide APIs for integrating apps with assistive technologies like the bundled screen readers VoiceOver (iOS) and TalkBack (Android). React Native has complementary APIs that let your app accommodate all users.
+
+:::info
+Android and iOS differ slightly in their approaches, and thus the React Native implementations may vary by platform.
+:::
+
+## Accessibility properties
+
+### `accessible`
+
+When `true`, indicates that the view is discoverable by assistive technologies such as screen readers and hardware keyboards. Note that this does not necessarily mean that the view will be focused by VoiceOver or TalkBack. There are a number of reasons for this, such as VoiceOver disallowing nested accessibility elements, or TalkBack opting to focus some parent element instead.
+
+By default, all touchable elements are accessible.
+
+On Android, `accessible` will be translated into native [`focusable`](). On iOS, it translates into native [`isAccessibilityElement`](https://developer.apple.com/documentation/uikit/uiaccessibilityelement/isaccessibilityelement?language=objc).
+
+```tsx
+
+
+
+
+```
+
+In the above example, accessibility focus is only available on the first child view with the `accessible` property, and not for the parent or sibling without `accessible`.
+
+### `accessibilityLabel`
+
+When a view is marked as accessible, it is a good practice to set an `accessibilityLabel` on the view, so that people who use VoiceOver or TalkBack know what element they have selected. A screen reader will verbalize this string when the associated element is selected.
+
+To use, set the `accessibilityLabel` property to a custom string on your View, Text, or Touchable:
+
+```tsx
+
+
+ Press me!
+
+
+```
+
+In the above example, the `accessibilityLabel` on the TouchableOpacity element would default to "Press me!". The label is constructed by concatenating all Text node children separated by spaces.
+
+### `accessibilityLabelledBy`
Android
+
+A reference to another element [nativeID](view.md#nativeid) used to build complex forms.
+The value of `accessibilityLabelledBy` should match the `nativeID` of the related element:
+
+```tsx
+
+ Label for Input Field
+
+
+```
+
+In the above example, the screen reader announces `Input, Edit Box for Label for Input Field` when focusing on the TextInput.
+
+### `accessibilityHint`
+
+An accessibility hint can be used to provide additional context to the user on the result of the action when it is not clear from the accessibility label alone.
+
+Provide the `accessibilityHint` property a custom string on your View, Text, or Touchable:
+
+```tsx
+
+
+ Back
+
+
+```
+
+
iOS
+
+In the above example, VoiceOver will read the hint after the label, if the user has hints enabled in the device's VoiceOver settings. Read more about guidelines for `accessibilityHint` in the [iOS Developer Docs](https://developer.apple.com/documentation/objectivec/nsobject/1615093-accessibilityhint)
+
+
Android
+
+In the above example, TalkBack will read the hint after the label. At this time, hints cannot be turned off on Android.
+
+### `accessibilityLanguage`
iOS
+
+By using the `accessibilityLanguage` property, the screen reader will understand which language to use while reading the element's **label**, **value**, and **hint**. The provided string value must follow the [BCP 47 specification](https://www.rfc-editor.org/info/bcp47).
+
+```tsx
+
+ 🍕
+
+```
+
+### `accessibilityIgnoresInvertColors`
iOS
+
+Inverting screen colors is an accessibility feature available in iOS and iPadOS for people with color blindness, low vision, or vision impairment. If there's a view you don't want to invert when this setting is on, possibly a photo, set this property to `true`.
+
+### `accessibilityLiveRegion`
Android
+
+When components dynamically change, we want TalkBack to alert the end user. This is made possible by the `accessibilityLiveRegion` property. It can be set to `none`, `polite`, and `assertive`:
+
+- **none** Accessibility services should not announce changes to this view.
+- **polite** Accessibility services should announce changes to this view.
+- **assertive** Accessibility services should interrupt ongoing speech to immediately announce changes to this view.
+
+```tsx
+
+
+ Click me
+
+
+
+ Clicked {count} times
+
+```
+
+In the above example method `addOne` changes the state variable `count`. When the TouchableWithoutFeedback is triggered, TalkBack reads the text in the Text view because of its `accessibilityLiveRegion="polite"` property.
+
+### `accessibilityRole`
+
+`accessibilityRole` communicates the purpose of a component to the user of assistive technology.
+
+`accessibilityRole` can be one of the following:
+
+- **adjustable** Used when an element can be "adjusted" (e.g. a slider).
+- **alert** Used when an element contains important text to be presented to the user.
+- **button** Used when the element should be treated as a button.
+- **checkbox** Used when an element represents a checkbox that can be checked, unchecked, or have a mixed checked state.
+- **combobox** Used when an element represents a combo box, which allows the user to select among several choices.
+- **header** Used when an element acts as a header for a content section (e.g. the title of a navigation bar).
+- **image** Used when the element should be treated as an image. Can be combined with a button or link.
+- **imagebutton** Used when the element should be treated as a button and is also an image.
+- **keyboardkey** Used when the element acts as a keyboard key.
+- **link** Used when the element should be treated as a link.
+- **menu** Used when the component is a menu of choices.
+- **menubar** Used when a component is a container of multiple menus.
+- **menuitem** Used to represent an item within a menu.
+- **none** Used when the element has no role.
+- **progressbar** Used to represent a component that indicates the progress of a task.
+- **radio** Used to represent a radio button.
+- **radiogroup** Used to represent a group of radio buttons.
+- **scrollbar** Used to represent a scroll bar.
+- **search** Used when a text field element should also be treated as a search field.
+- **spinbutton** Used to represent a button that opens a list of choices.
+- **summary** Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches.
+- **switch** Used to represent a switch that can be turned on and off.
+- **tab** Used to represent a tab.
+- **tablist** Used to represent a list of tabs.
+- **text** Used when the element should be treated as static text that cannot change.
+- **timer** Used to represent a timer.
+- **togglebutton** Used to represent a toggle button. Should be used with accessibilityState checked to indicate if the button is toggled on or off.
+- **toolbar** Used to represent a toolbar (a container of action buttons or components).
+- **grid** Used with ScrollView, VirtualizedList, FlatList, or SectionList to represent a grid. Adds the in/out of grid announcements to Android's GridView.
+
+### `accessibilityShowsLargeContentViewer`
iOS
+
+A boolean value that determines whether the large content viewer is shown when the user performs a long press on the element.
+
+Available in iOS 13.0 and later.
+
+### `accessibilityLargeContentTitle`
iOS
+
+A string that will be used as the title of the large content viewer when it is shown.
+
+Requires `accessibilityShowsLargeContentViewer` to be set to `true`.
+
+```tsx
+
+ Home
+
+```
+
+### `accessibilityState`
+
+Describes the current state of a component to the assistive technology user.
+
+`accessibilityState` is an object. It contains the following fields:
+
+| Name | Description | Type | Required |
+| -------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- |
+| disabled | Indicates whether the element is disabled or not. | boolean | No |
+| selected | Indicates whether a selectable element is currently selected or not. | boolean | No |
+| checked | Indicates the state of a checkable element. This field can either take a boolean or the "mixed" string to represent mixed checkboxes. | boolean or 'mixed' | No |
+| busy | Indicates whether an element is currently busy or not. | boolean | No |
+| expanded | Indicates whether an expandable element is currently expanded or collapsed. | boolean | No |
+
+To use, set the `accessibilityState` to an object with a specific definition.
+
+### `accessibilityValue`
+
+Represents the current value of a component. It can be a textual description of a component's value, or for range-based components, such as sliders and progress bars, it contains range information (minimum, current, and maximum).
+
+`accessibilityValue` is an object. It contains the following fields:
+
+| Name | Description | Type | Required |
+| ---- | ---------------------------------------------------------------------------------------------- | ------- | ------------------------- |
+| min | The minimum value of this component's range. | integer | Required if `now` is set. |
+| max | The maximum value of this component's range. | integer | Required if `now` is set. |
+| now | The current value of this component's range. | integer | No |
+| text | A textual description of this component's value. Will override `min`, `now`, and `max` if set. | string | No |
+
+### `accessibilityViewIsModal`
iOS
+
+A boolean value that indicates whether VoiceOver should ignore the elements within views that are siblings of the receiver.
+
+For example, in a window that contains sibling views `A` and `B`, setting `accessibilityViewIsModal` to `true` on view `B` causes VoiceOver to ignore the elements in view `A`. On the other hand, if view `B` contains a child view `C` and you set `accessibilityViewIsModal` to `true` on view `C`, VoiceOver does not ignore the elements in view `A`.
+
+### `accessibilityElementsHidden`
iOS
+
+A boolean value indicating whether the given accessibility element, and any accessibility elements it contains, are hidden.
+
+For example, in a window that contains sibling views `A` and `B`, setting `accessibilityElementsHidden` to `true` on view `B` causes VoiceOver to ignore the `B` view and any elements it contains. This is similar to the Android property `importantForAccessibility="no-hide-descendants"`.
+
+### `aria-valuemax`
+
+Represents the maximum value for range-based components, such as sliders and progress bars.
+
+### `aria-valuemin`
+
+Represents the minimum value for range-based components, such as sliders and progress bars.
+
+### `aria-valuenow`
+
+Represents the current value for range-based components, such as sliders and progress bars.
+
+### `aria-valuetext`
+
+Represents the textual description of the component.
+
+### `aria-busy`
+
+Indicates an element is being modified and that assistive technologies may want to wait until the changes are complete before informing the user about the update.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
+
+### `aria-checked`
+
+Indicates the state of a checkable element. This field can either take a boolean or the "mixed" string to represent mixed checkboxes.
+
+| Type | Default |
+| ---------------- | ------- |
+| boolean, 'mixed' | false |
+
+### `aria-disabled`
+
+Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
+
+### `aria-expanded`
+
+Indicates whether an expandable element is currently expanded or collapsed.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
+
+### `aria-hidden`
+
+Indicates whether the element is hidden from assistive technologies.
+
+For example, in a window that contains sibling views `A` and `B`, setting `aria-hidden` to `true` on view `B` causes VoiceOver to ignore the `B` element and its children.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
+
+### `aria-label`
+
+Defines a string value that can be used to name an element.
+
+| Type |
+| ------ |
+| string |
+
+### `aria-labelledby`
Android
+
+Identifies the element that labels the element it is applied to. The value of `aria-labelledby` should match the [`nativeID`](view.md#nativeid) of the related element:
+
+```tsx
+
+ Label for Input Field
+
+
+```
+
+| Type |
+| ------ |
+| string |
+
+### `aria-live`
Android
+
+Indicates that an element will be updated and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
+
+- **off** Accessibility services should not announce changes to this view.
+- **polite** Accessibility services should announce changes to this view.
+- **assertive** Accessibility services should interrupt ongoing speech to immediately announce changes to this view.
+
+| Type | Default |
+| ---------------------------------------- | ------- |
+| enum(`'assertive'`, `'off'`, `'polite'`) | `'off'` |
+
+---
+
+### `aria-modal`
iOS
+
+Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | false |
+
+### `aria-selected`
+
+Indicates whether a selectable element is currently selected or not.
+
+| Type |
+| ------- |
+| boolean |
+
+### `experimental_accessibilityOrder`
+
+
+
+:::note
+For the sake of brevity, layout is excluded in the following examples even though it dictates the default focus order. Assume the document order matches the layout order.
+:::
+
+`experimental_accessibilityOrder` lets you define the order in which assistive technologies focus descendant components. It is an array of [`nativeIDs`](view.md#nativeid) that are set on the components whose order you are controlling. For example:
+
+```
+
+
+
+
+
+```
+
+Assistive technologies will focus the `View` with `nativeID` of `B`, then `C`, then `A`.
+
+`experimental_accessibilityOrder` will not “turn on” accessibility for the components it references, that still needs to be done. So if we remove `accessible={true}` on `C` above like so
+
+```
+
+
+
+
+
+```
+
+then the new order will be `B` then `A`, even though `C` is still in `experimental_accessibilityOrder`.
+
+`experimental_accessibilityOrder` will “turn off” accessibility of components it doesn’t reference, however.
+
+```
+
+
+
+
+
+
+```
+
+The order of the above example would be `B`, `C`, `A`. `D` will never get focused. In this sense `experimental_accessibilityOrder` is _exhaustive_.
+
+There are still valid reasons to include an non-accessible component in `experimental_accessibilityOrder`. Consider
+
+```
+
+
+
+
+
+
+
+
+
+```
+
+The focus order will be `B`, `D`, `E`, `F`, `A`. Even though `D`, `E`, and `F` are not directly referenced in `experimental_accessibilityOrder`, `C` is directly referenced. In this instance `C` in an _accessibility container_ - it contains accessible elements, but is not accessible itself. If an accessibility container is referenced in `experimental_accessibilityOrder` then the default order of the elements it contains is applied. In this sense `experimental_accessibilityOrder` is _nestable_.
+
+`experimental_accessibilityOrder` can also reference another component with `experimental_accessibilityOrder`
+
+```
+
+
+
+
+
+
+
+
+
+```
+
+The focus order will be `B`, `F`, `E`, `D`, `A`.
+
+A component cannot be both an accessibility container and an accessibility element (`accessible={true}`). So if we have
+
+```
+
+
+
+
+
+
+
+
+
+```
+
+The focus order would be `B`, `C`, `A`. `D`, `E`, and `F` are no longer in a container, so the exhaustive nature of `experimental_accessibilityOrder` means they will be excluded.
+
+### `importantForAccessibility`
Android
+
+In the case of two overlapping UI components with the same parent, default accessibility focus can have unpredictable behavior. The `importantForAccessibility` property will resolve this by controlling if a view fires accessibility events and if it is reported to accessibility services. It can be set to `auto`, `yes`, `no` and `no-hide-descendants` (the last value will force accessibility services to ignore the component and all of its children).
+
+```tsx
+
+
+ First layout
+
+
+ Second layout
+
+
+```
+
+In the above example, the `yellow` layout and its descendants are completely invisible to TalkBack and all other accessibility services. So we can use overlapping views with the same parent without confusing TalkBack.
+
+### `onAccessibilityEscape`
iOS
+
+Assign this property to a custom function which will be called when someone performs the "escape" gesture, which is a two finger Z shaped gesture. An escape function should move back hierarchically in the user interface. This can mean moving up or back in a navigation hierarchy or dismissing a modal user interface. If the selected element does not have an `onAccessibilityEscape` function, the system will attempt to traverse up the view hierarchy until it finds a view that does or bonk to indicate it was unable to find one.
+
+### `onAccessibilityTap`
iOS
+
+Use this property to assign a custom function to be called when someone activates an accessible element by double tapping on it while it's selected.
+
+### `onMagicTap`
iOS
+
+Assign this property to a custom function which will be called when someone performs the "magic tap" gesture, which is a double-tap with two fingers. A magic tap function should perform the most relevant action a user could take on a component. In the Phone app on iPhone, a magic tap answers a phone call or ends the current one. If the selected element does not have an `onMagicTap` function, the system will traverse up the view hierarchy until it finds a view that does.
+
+### `role`
+
+`role` communicates the purpose of a component and has precedence over the [`accessibilityRole`](accessibility#accessibilityrole) prop.
+
+`role` can be one of the following:
+
+- **alert** Used when an element contains important text to be presented to the user.
+- **button** Used when the element should be treated as a button.
+- **checkbox** Used when an element represents a checkbox that can be checked, unchecked, or have a mixed checked state.
+- **combobox** Used when an element represents a combo box, which allows the user to select among several choices.
+- **grid** Used with ScrollView, VirtualizedList, FlatList, or SectionList to represent a grid. Adds the in/out of grid announcements to the android GridView.
+- **heading** Used when an element acts as a header for a content section (e.g. the title of a navigation bar).
+- **img** Used when the element should be treated as an image. Can be combined with a button or link, for example.
+- **link** Used when the element should be treated as a link.
+- **list** Used to identify a list of items.
+- **listitem** Used to itentify an item in a list.
+- **menu** Used when the component is a menu of choices.
+- **menubar** Used when a component is a container of multiple menus.
+- **menuitem** Used to represent an item within a menu.
+- **none** Used when the element has no role.
+- **presentation** Used when the element has no role.
+- **progressbar** Used to represent a component that indicates the progress of a task.
+- **radio** Used to represent a radio button.
+- **radiogroup** Used to represent a group of radio buttons.
+- **scrollbar** Used to represent a scroll bar.
+- **searchbox** Used when the text field element should also be treated as a search field.
+- **slider** Used when an element can be "adjusted" (e.g. a slider).
+- **spinbutton** Used to represent a button that opens a list of choices.
+- **summary** Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches.
+- **switch** Used to represent a switch that can be turned on and off.
+- **tab** Used to represent a tab.
+- **tablist** Used to represent a list of tabs.
+- **timer** Used to represent a timer.
+- **toolbar** Used to represent a toolbar (a container of action buttons or components).
+
+## Accessibility Actions
+
+Accessibility actions allow assistive technology to programmatically invoke the action(s) of a component. To support accessibility actions, a component must do two things:
+
+- Define the list of actions it supports via the `accessibilityActions` property.
+- Implement an `onAccessibilityAction` function to handle action requests.
+
+The `accessibilityActions` property should contain a list of action objects. Each action object should contain the following fields:
+
+| Name | Type | Required |
+| ----- | ------ | -------- |
+| name | string | Yes |
+| label | string | No |
+
+Actions either represent standard actions, such as clicking a button or adjusting a slider, or custom actions specific to a given component such as deleting an email message. The `name` field is required for both standard and custom actions, but `label` is optional for standard actions.
+
+When adding support for standard actions, `name` must be one of the following:
+
+- `'magicTap'` - iOS only - While VoiceOver focus is on or inside the component, the user double tapped with two fingers.
+- `'escape'` - iOS only - While VoiceOver focus is on or inside the component, the user performed a two-finger scrub gesture (left, right, left).
+- `'activate'` - Activate the component. This should perform the same action with, or without, assistive technology. Engaged when a screen reader user double taps the component.
+- `'increment'` - Increment an adjustable component. On iOS, VoiceOver generates this action when the component has a role of `'adjustable'` and the user places focus on it and swipes upward. On Android, TalkBack generates this action when the user places accessibility focus on the component and presses the volume-up button.
+- `'decrement'` - Decrement an adjustable component. On iOS, VoiceOver generates this action when the component has a role of `'adjustable'` and the user places focus on it and swipes downward. On Android, TalkBack generates this action when the user places accessibility focus on the component and presses the volume-down button.
+- `'longpress'` - Android only - This action is generated when the user places accessibility focus on the component, then double-taps and holds one finger on the screen. This should perform the same action with, or without, assistive technology.
+- `'expand'` - Android only - This action "expands" the component so that TalkBack will announce an "expanded" hint.
+- `'collapse'` - Android only - This action "collapses" the component so that TalkBack will announce a "collapsed" hint.
+
+The `label` field is optional for standard actions and is often unused by assistive technologies. For custom actions, it is a localized string containing a description of the action to be presented to the user.
+
+To handle action requests, a component must implement an `onAccessibilityAction` function. The only argument to this function is an event containing the name of the action to perform. The below example from RNTester shows how to create a component that defines and handles several custom actions.
+
+```tsx
+ {
+ switch (event.nativeEvent.actionName) {
+ case 'cut':
+ Alert.alert('Alert', 'cut action success');
+ break;
+ case 'copy':
+ Alert.alert('Alert', 'copy action success');
+ break;
+ case 'paste':
+ Alert.alert('Alert', 'paste action success');
+ break;
+ }
+ }}
+/>
+```
+
+## Checking if a Screen Reader is Enabled
+
+The `AccessibilityInfo` API allows you to determine whether or not a screen reader is currently active. See the [AccessibilityInfo documentation](accessibilityinfo) for details.
+
+## Sending Accessibility Events
Android
+
+Sometimes it is useful to trigger an accessibility event on a UI component (i.e. when a custom view appears on a screen or set accessibility focus to a view). Native UIManager module exposes a method ‘sendAccessibilityEvent’ for this purpose. It takes two arguments: a view tag and a type of event. The supported event types are `typeWindowStateChanged`, `typeViewFocused`, and `typeViewClicked`.
+
+```tsx
+import {Platform, UIManager, findNodeHandle} from 'react-native';
+
+if (Platform.OS === 'android') {
+ UIManager.sendAccessibilityEvent(
+ findNodeHandle(this),
+ UIManager.AccessibilityEventTypes.typeViewFocused,
+ );
+}
+```
+
+## Testing TalkBack Support
Android
+
+To enable TalkBack, go to the Settings app on your Android device or emulator. Tap Accessibility, then TalkBack. Toggle the "Use service" switch to enable or disable it.
+
+Android emulators don't have TalkBack installed by default. You can install TalkBack on your emulator via the Google Play Store. Make sure to choose an emulator with the Google Play store installed. These are available in Android Studio.
+
+You can use the volume key shortcut to toggle TalkBack. To turn on the volume key shortcut, go to the Settings app, then Accessibility. At the top, turn on the volume key shortcut.
+
+To use the volume key shortcut, press both volume keys for 3 seconds to start an accessibility tool.
+
+Additionally, if you prefer, you can toggle TalkBack via the command line with:
+
+```shell
+# disable
+adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService
+
+# enable
+adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
+```
+
+## Testing VoiceOver Support
iOS
+
+To enable VoiceOver on your iOS or iPadOS device, go to the Settings app, tap General, then Accessibility. There you will find many tools available for people to enable their devices to be more usable, including VoiceOver. To enable VoiceOver, tap on VoiceOver under "Vision" and toggle the switch that appears at the top.
+
+At the very bottom of the Accessibility settings, there is an "Accessibility Shortcut". You can use this to toggle VoiceOver by triple-clicking the Home button.
+
+VoiceOver isn't available via the simulator, but you can use Accessibility Inspector from Xcode to use the macOS VoiceOver through an application. Note it's always best to test with a device as macOS's VoiceOver may result in varied experiences.
+
+## Additional Resources
+
+- [Making React Native Apps Accessible](https://engineering.fb.com/ios/making-react-native-apps-accessible/)
diff --git a/website/versioned_docs/version-0.86/accessibilityinfo.md b/website/versioned_docs/version-0.86/accessibilityinfo.md
new file mode 100644
index 00000000000..af69fbcfec3
--- /dev/null
+++ b/website/versioned_docs/version-0.86/accessibilityinfo.md
@@ -0,0 +1,292 @@
+---
+id: accessibilityinfo
+title: AccessibilityInfo
+---
+
+Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The `AccessibilityInfo` API is designed for this purpose. You can use it to query the current state of the screen reader as well as to register to be notified when the state of the screen reader changes.
+
+## Example
+
+```SnackPlayer name=AccessibilityInfo%20Example&supportedPlatforms=android,ios
+import React, {useState, useEffect} from 'react';
+import {AccessibilityInfo, Text, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [reduceMotionEnabled, setReduceMotionEnabled] = useState(false);
+ const [screenReaderEnabled, setScreenReaderEnabled] = useState(false);
+
+ useEffect(() => {
+ const reduceMotionChangedSubscription = AccessibilityInfo.addEventListener(
+ 'reduceMotionChanged',
+ isReduceMotionEnabled => {
+ setReduceMotionEnabled(isReduceMotionEnabled);
+ },
+ );
+ const screenReaderChangedSubscription = AccessibilityInfo.addEventListener(
+ 'screenReaderChanged',
+ isScreenReaderEnabled => {
+ setScreenReaderEnabled(isScreenReaderEnabled);
+ },
+ );
+
+ AccessibilityInfo.isReduceMotionEnabled().then(isReduceMotionEnabled => {
+ setReduceMotionEnabled(isReduceMotionEnabled);
+ });
+ AccessibilityInfo.isScreenReaderEnabled().then(isScreenReaderEnabled => {
+ setScreenReaderEnabled(isScreenReaderEnabled);
+ });
+
+ return () => {
+ reduceMotionChangedSubscription.remove();
+ screenReaderChangedSubscription.remove();
+ };
+ }, []);
+
+ return (
+
+
+
+ The reduce motion is {reduceMotionEnabled ? 'enabled' : 'disabled'}.
+
+
+ The screen reader is {screenReaderEnabled ? 'enabled' : 'disabled'}.
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ status: {
+ margin: 30,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `addEventListener()`
+
+```tsx
+static addEventListener(
+ eventName: AccessibilityChangeEventName | AccessibilityAnnouncementEventName,
+ handler: (
+ event: AccessibilityChangeEvent | AccessibilityAnnouncementFinishedEvent,
+ ) => void,
+): EmitterSubscription;
+```
+
+Add an event handler. Supported events:
+
+| Event name | Description |
+| ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `accessibilityServiceChanged`
Android
| Fires when some services such as TalkBack, other Android assistive technologies, and third-party accessibility services are enabled. The argument to the event handler is a boolean. The boolean is `true` when a some accessibility services is enabled and `false` otherwise. |
+| `announcementFinished`
iOS
| Fires when the screen reader has finished making an announcement. The argument to the event handler is a dictionary with these keys:
`announcement`: The string announced by the screen reader.
`success`: A boolean indicating whether the announcement was successfully made.
|
+| `boldTextChanged`
iOS
| Fires when the state of the bold text toggle changes. The argument to the event handler is a boolean. The boolean is `true` when bold text is enabled and `false` otherwise. |
+| `grayscaleChanged`
iOS
| Fires when the state of the gray scale toggle changes. The argument to the event handler is a boolean. The boolean is `true` when a gray scale is enabled and `false` otherwise. |
+| `invertColorsChanged`
iOS
| Fires when the state of the invert colors toggle changes. The argument to the event handler is a boolean. The boolean is `true` when invert colors is enabled and `false` otherwise. |
+| `reduceMotionChanged` | Fires when the state of the reduce motion toggle changes. The argument to the event handler is a boolean. The boolean is `true` when a reduce motion is enabled (or when "Transition Animation Scale" in "Developer options" is "Animation off") and `false` otherwise. |
+| `reduceTransparencyChanged`
iOS
| Fires when the state of the reduce transparency toggle changes. The argument to the event handler is a boolean. The boolean is `true` when reduce transparency is enabled and `false` otherwise. |
+| `screenReaderChanged` | Fires when the state of the screen reader changes. The argument to the event handler is a boolean. The boolean is `true` when a screen reader is enabled and `false` otherwise. |
+
+---
+
+### `announceForAccessibility()`
+
+```tsx
+static announceForAccessibility(announcement: string);
+```
+
+Post a string to be announced by the screen reader.
+
+---
+
+### `announceForAccessibilityWithOptions()`
+
+```tsx
+static announceForAccessibilityWithOptions(
+ announcement: string,
+ options: {queue?: boolean},
+);
+```
+
+Post a string to be announced by the screen reader with modification options. By default announcements will interrupt any existing speech, but on iOS they can be queued behind existing speech by setting `queue` to `true` in the options object.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ----------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
+| announcement
Required
| string | The string to be announced |
+| options
+
+```tsx
+static getRecommendedTimeoutMillis(originalTimeout: number): Promise;
+```
+
+Gets the timeout in millisecond that the user needs.
+This value is set in "Time to take action (Accessibility timeout)" of "Accessibility" settings.
+
+**Parameters:**
+
+| Name | Type | Description |
+| -------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------- |
+| originalTimeout
Required
| number | The timeout to return if "Accessibility timeout" is not set. Specify in milliseconds. |
+
+---
+
+### `isAccessibilityServiceEnabled()`
Android
+
+```tsx
+static isAccessibilityServiceEnabled(): Promise;
+```
+
+Check whether any accessibility service is enabled. This includes TalkBack but also any third-party accessibility app that may be installed. To only check whether TalkBack is enabled, use [isScreenReaderEnabled](#isscreenreaderenabled). Returns a promise which resolves to a boolean. The result is `true` when some accessibility services is enabled and `false` otherwise.
+
+:::note
+Please use [`isScreenReaderEnabled`](#isscreenreaderenabled) if you only want to check the status of TalkBack.
+:::
+
+---
+
+### `isBoldTextEnabled()`
iOS
+
+```tsx
+static isBoldTextEnabled(): Promise:
+```
+
+Query whether a bold text is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when bold text is enabled and `false` otherwise.
+
+---
+
+### `isGrayscaleEnabled()`
iOS
+
+```tsx
+static isGrayscaleEnabled(): Promise;
+```
+
+Query whether grayscale is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when grayscale is enabled and `false` otherwise.
+
+---
+
+### `isInvertColorsEnabled()`
iOS
+
+```tsx
+static isInvertColorsEnabled(): Promise;
+```
+
+Query whether invert colors is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when invert colors is enabled and `false` otherwise.
+
+---
+
+### `isReduceMotionEnabled()`
+
+```tsx
+static isReduceMotionEnabled(): Promise;
+```
+
+Query whether reduce motion is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when reduce motion is enabled and `false` otherwise.
+
+---
+
+### `isReduceTransparencyEnabled()`
iOS
+
+```tsx
+static isReduceTransparencyEnabled(): Promise;
+```
+
+Query whether reduce transparency is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when a reduce transparency is enabled and `false` otherwise.
+
+---
+
+### `isScreenReaderEnabled()`
+
+```tsx
+static isScreenReaderEnabled(): Promise;
+```
+
+Query whether a screen reader is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when a screen reader is enabled and `false` otherwise.
+
+---
+
+### `isHighTextContrastEnabled()`
Android
+
+```tsx
+static isHighTextContrastEnabled(): Promise
+```
+
+Query whether high text contrast is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when high text contrast is enabled and `false` otherwise.
+
+---
+
+### `isDarkerSystemColorsEnabled()`
iOS
+
+```tsx
+static isDarkerSystemColorsEnabled(): Promise
+```
+
+Query whether dark system colors is currently enabled. Returns a promise which resolves to a boolean. The result is `true` when dark system colors is enabled and `false` otherwise.
+
+---
+
+### `prefersCrossFadeTransitions()`
iOS
+
+```tsx
+static prefersCrossFadeTransitions(): Promise;
+```
+
+Query whether reduce motion and prefer cross-fade transitions settings are currently enabled. Returns a promise which resolves to a boolean. The result is `true` when prefer cross-fade transitions is enabled and `false` otherwise.
+
+---
+
+### 🗑️ `setAccessibilityFocus()`
+
+:::warning Deprecated
+Prefer using `sendAccessibilityEvent` with eventType `focus` instead.
+:::
+
+```tsx
+static setAccessibilityFocus(reactTag: number);
+```
+
+Set accessibility focus to a React component.
+
+On Android, this calls `UIManager.sendAccessibilityEvent` method with passed `reactTag` and `UIManager.AccessibilityEventTypes.typeViewFocused` arguments.
+
+:::note
+Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`.
+:::
+
+---
+
+### `sendAccessibilityEvent()`
+
+```tsx
+static sendAccessibilityEvent(host: HostInstance, eventType: AccessibilityEventTypes);
+```
+
+Imperatively trigger an accessibility event on a React component, like changing the focused element for a screen reader.
+
+:::note
+Make sure that any `View` you want to receive the accessibility focus has `accessible={true}`.
+:::
+
+| Name | Type | Description |
+| -------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
+| host
Required
| HostInstance | The component ref to send the event to. |
+| eventType
Required
| AccessibilityEventTypes | One of `'click'` (Android only), `'focus'`, `'viewHoverEnter'` (Android only), or `'windowStateChange'` (Android only) |
diff --git a/website/versioned_docs/version-0.86/actionsheetios.md b/website/versioned_docs/version-0.86/actionsheetios.md
new file mode 100644
index 00000000000..30d1d6afea5
--- /dev/null
+++ b/website/versioned_docs/version-0.86/actionsheetios.md
@@ -0,0 +1,144 @@
+---
+id: actionsheetios
+title: ActionSheetIOS
+---
+
+Displays native to iOS [Action Sheet](https://developer.apple.com/design/human-interface-guidelines/action-sheets) component.
+
+## Example
+
+```SnackPlayer name=ActionSheetIOS%20Example&supportedPlatforms=ios
+import React, {useState} from 'react';
+import {ActionSheetIOS, Button, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [result, setResult] = useState('🔮');
+
+ const onPress = () =>
+ ActionSheetIOS.showActionSheetWithOptions(
+ {
+ options: ['Cancel', 'Generate number', 'Reset'],
+ destructiveButtonIndex: 2,
+ cancelButtonIndex: 0,
+ userInterfaceStyle: 'dark',
+ },
+ buttonIndex => {
+ if (buttonIndex === 0) {
+ // cancel action
+ } else if (buttonIndex === 1) {
+ setResult(String(Math.floor(Math.random() * 100) + 1));
+ } else if (buttonIndex === 2) {
+ setResult('🔮');
+ }
+ },
+ );
+
+ return (
+
+
+ {result}
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ result: {
+ fontSize: 64,
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+# Reference
+
+## Methods
+
+### `showActionSheetWithOptions()`
+
+```tsx
+static showActionSheetWithOptions: (
+ options: ActionSheetIOSOptions,
+ callback: (buttonIndex: number) => void,
+);
+```
+
+Display an iOS action sheet. The `options` object must contain one or more of:
+
+- `options` (array of strings) - a list of button titles (required)
+- `cancelButtonIndex` (int) - index of cancel button in `options`
+- `cancelButtonTintColor` (string) - the [color](colors) used for the change the text color of the cancel button
+- `destructiveButtonIndex` (int or array of ints) - indices of destructive buttons in `options`
+- `title` (string) - a title to show above the action sheet
+- `message` (string) - a message to show below the title
+- `anchor` (number) - the node to which the action sheet should be anchored (used for iPad)
+- `tintColor` (string) - the [color](colors) used for non-destructive button titles
+- `disabledButtonIndices` (array of numbers) - a list of button indices which should be disabled
+- `userInterfaceStyle` (string) - the interface style used for the action sheet, can be set to `light` or `dark`, otherwise the default system style will be used
+
+The 'callback' function takes one parameter, the zero-based index of the selected item.
+
+Minimal example:
+
+```tsx
+ActionSheetIOS.showActionSheetWithOptions(
+ {
+ options: ['Cancel', 'Remove'],
+ destructiveButtonIndex: 1,
+ cancelButtonIndex: 0,
+ },
+ buttonIndex => {
+ if (buttonIndex === 1) {
+ /* destructive action */
+ }
+ },
+);
+```
+
+---
+
+### `dismissActionSheet()`
+
+```tsx
+static dismissActionSheet();
+```
+
+Dismisses the most upper iOS action sheet presented, if no action sheet is present a warning is displayed.
+
+---
+
+### `showShareActionSheetWithOptions()`
+
+```tsx
+static showShareActionSheetWithOptions: (
+ options: ShareActionSheetIOSOptions,
+ failureCallback: (error: Error) => void,
+ successCallback: (success: boolean, method: string) => void,
+);
+```
+
+Display the iOS share sheet. The `options` object should contain one or both of `message` and `url` and can additionally have a `subject` or `excludedActivityTypes`:
+
+- `url` (string) - a URL to share
+- `message` (string) - a message to share
+- `subject` (string) - a subject for the message
+- `excludedActivityTypes` (array) - the activities to exclude from the ActionSheet
+
+:::note
+If `url` points to a local file, or is a base64-encoded uri, the file it points to will be loaded and shared directly. In this way, you can share images, videos, PDF files, etc. If `url` points to a remote file or address it must conform to URL format as described in [RFC 2396](https://www.ietf.org/rfc/rfc2396.txt). For example, a web URL without a proper protocol (HTTP/HTTPS) will not be shared.
+:::
+
+The 'failureCallback' function takes one parameter, an error object. The only property defined on this object is an optional `stack` property of type `string`.
+
+The 'successCallback' function takes two parameters:
+
+- a boolean value signifying success or failure
+- a string that, in the case of success, indicates the method of sharing
diff --git a/website/versioned_docs/version-0.86/activityindicator.md b/website/versioned_docs/version-0.86/activityindicator.md
new file mode 100644
index 00000000000..c9d03b73021
--- /dev/null
+++ b/website/versioned_docs/version-0.86/activityindicator.md
@@ -0,0 +1,93 @@
+---
+id: activityindicator
+title: ActivityIndicator
+---
+
+Displays a circular loading indicator.
+
+## Example
+
+```SnackPlayer name=ActivityIndicator%20Example
+import React from 'react';
+import {ActivityIndicator, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => (
+
+
+
+
+
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ horizontal: {
+ flexDirection: 'row',
+ justifyContent: 'space-around',
+ padding: 10,
+ },
+});
+
+export default App;
+```
+
+# Reference
+
+## Props
+
+### [View Props](view#props)
+
+Inherits [View Props](view#props).
+
+---
+
+### `animating`
+
+Whether to show the indicator (`true`) or hide it (`false`).
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `color`
+
+The foreground color of the spinner.
+
+| Type | Default |
+| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [color](colors) | `null` (system accent default color)
Android
`'#999999'`
iOS
|
+
+---
+
+### `hidesWhenStopped`
iOS
+
+Whether the indicator should hide when not animating.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `ref`
+
+A ref setter that will be assigned an [element node](element-nodes) when mounted.
+
+---
+
+### `size`
+
+Size of the indicator.
+
+| Type | Default |
+| ---------------------------------------------------------------------------------- | --------- |
+| enum(`'small'`, `'large'`)number
Android
| `'small'` |
diff --git a/website/versioned_docs/version-0.86/alert.md b/website/versioned_docs/version-0.86/alert.md
new file mode 100644
index 00000000000..c80b62fb7a6
--- /dev/null
+++ b/website/versioned_docs/version-0.86/alert.md
@@ -0,0 +1,254 @@
+---
+id: alert
+title: Alert
+---
+
+Launches an alert dialog with the specified title and message.
+
+Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button.
+
+This is an API that works both on Android and iOS and can show static alerts. Alert that prompts the user to enter some information is available on iOS only.
+
+## Example
+
+```SnackPlayer name=Alert%20Example&supportedPlatforms=ios,android
+import React from 'react';
+import {StyleSheet, Button, Alert} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const createTwoButtonAlert = () =>
+ Alert.alert('Alert Title', 'My Alert Msg', [
+ {
+ text: 'Cancel',
+ onPress: () => console.log('Cancel Pressed'),
+ style: 'cancel',
+ },
+ {text: 'OK', onPress: () => console.log('OK Pressed')},
+ ]);
+
+ const createThreeButtonAlert = () =>
+ Alert.alert('Alert Title', 'My Alert Msg', [
+ {
+ text: 'Ask me later',
+ onPress: () => console.log('Ask me later pressed'),
+ },
+ {
+ text: 'Cancel',
+ onPress: () => console.log('Cancel Pressed'),
+ style: 'cancel',
+ },
+ {text: 'OK', onPress: () => console.log('OK Pressed')},
+ ]);
+
+ return (
+
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'space-around',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+## iOS
+
+On iOS you can specify any number of buttons. Each button can optionally specify a style or be emphasized, available options are represented by the [AlertButtonStyle](#alertbuttonstyle-ios) enum and the `isPreferred` field on [AlertButton](alert#alertbutton).
+
+## Android
+
+On Android at most three buttons can be specified. Android has a concept of a neutral, negative and a positive button:
+
+- If you specify one button, it will be the 'positive' one (such as 'OK')
+- Two buttons mean 'negative', 'positive' (such as 'Cancel', 'OK')
+- Three buttons mean 'neutral', 'negative', 'positive' (such as 'Later', 'Cancel', 'OK')
+
+Alerts on Android can be dismissed by tapping outside of the alert box. It is disabled by default and can be enabled by providing an optional [AlertOptions](alert#alertoptions) parameter with the cancelable property set to `true` i.e. `{cancelable: true}`.
+
+The cancel event can be handled by providing an `onDismiss` callback property inside the `options` parameter.
+
+### Example
| string | The dialog's title. Passing `null` or empty string will hide the title. |
+| message | string | An optional message that appears below the dialog's title. |
+| buttons | [AlertButton](alert#alertbutton)[] | An optional array containing buttons configuration. |
+| options | [AlertOptions](alert#alertoptions) | An optional Alert configuration. |
+
+---
+
+### `prompt()`
iOS
+
+```tsx
+static prompt: (
+ title: string,
+ message?: string,
+ callbackOrButtons?: ((text: string) => void) | AlertButton[],
+ type?: AlertType,
+ defaultValue?: string,
+ keyboardType?: string,
+);
+```
+
+Create and display a prompt to enter some text in form of Alert.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| title
Required
| string | The dialog's title. |
+| message | string | An optional message that appears above the text input. |
+| callbackOrButtons | function[AlertButton](alert#alertButton)[] | If passed a function, it will be called with the prompt's value `(text: string) => void`, when the user taps 'OK'.If passed an array, buttons will be configured based on the array content. |
+| type | [AlertType](alert#alerttype-ios) | This configures the text input. |
+| defaultValue | string | The default text in text input. |
+| keyboardType | string | The keyboard type of first text field (if exists). One of TextInput [keyboardTypes](textinput#keyboardtype). |
+| options | [AlertOptions](alert#alertoptions) | An optional Alert configuration. |
+
+---
+
+## Type Definitions
+
+### AlertButtonStyle
+
+An iOS Alert type.
+
+| Type |
+| ---- |
+| enum |
+
+**Constants:**
+
+| Value | Description |
+| ------------------ | ---------------------------- |
+| `'default'` | Default alert with no inputs |
+| `'plain-text'` | Plain text input alert |
+| `'secure-text'` | Secure text input alert |
+| `'login-password'` | Login and password alert |
+
+---
+
+### AlertButton
+
+An object describing the configuration of a button in the alert.
+
+| Type |
+| ---------------- |
+| array of objects |
+
+**Objects properties:**
+
+| Name | Type | Description |
+| ------------------------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------ |
+| text | string | Button label. |
+| onPress | function | Callback function when button is pressed. |
+| style
iOS
| [AlertButtonStyle](alert#alertbuttonstyle-ios) | Button style, on Android this property will be ignored. |
+| isPreferred
iOS
| boolean | Whether button should be emphasized, on Android this property will be ignored. |
+
+---
+
+### AlertOptions
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type | Description |
+| ------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
+| cancelable
Android
| boolean | Defines if alert can be dismissed by tapping outside of the alert box. |
+| userInterfaceStyle
iOS
| string | The interface style used for the alert, can be set to `light` or `dark`, otherwise the default system style will be used. |
+| onDismiss
Android
| function | Callback function fired when alert has been dismissed. |
diff --git a/website/versioned_docs/version-0.86/alertios.md b/website/versioned_docs/version-0.86/alertios.md
new file mode 100644
index 00000000000..a2d6d4f2610
--- /dev/null
+++ b/website/versioned_docs/version-0.86/alertios.md
@@ -0,0 +1,8 @@
+---
+id: alertios
+title: '❌ AlertIOS'
+---
+
+:::danger[Removed from React Native]
+Use [`Alert`](alert) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/animated.md b/website/versioned_docs/version-0.86/animated.md
new file mode 100644
index 00000000000..d4ba867028b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/animated.md
@@ -0,0 +1,541 @@
+---
+id: animated
+title: Animated
+---
+
+The `Animated` library is designed to make animations fluid, powerful, and painless to build and maintain. `Animated` focuses on declarative relationships between inputs and outputs, configurable transforms in between, and `start`/`stop` methods to control time-based animation execution.
+
+The core workflow for creating an animation is to create an `Animated.Value`, hook it up to one or more style attributes of an animated component, and then drive updates via animations using `Animated.timing()`.
+
+:::note
+Don't modify the animated value directly. You can use the [`useRef` Hook](https://react.dev/reference/react/useRef) to return a mutable ref object. This ref object's `current` property is initialized as the given argument and persists throughout the component lifecycle.
+:::
+
+## Example
+
+The following example contains a `View` which will fade in and fade out based on the animated value `fadeAnim`
+
+```SnackPlayer name=Animated%20Example
+import React from 'react';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+import {
+ Animated,
+ Text,
+ View,
+ StyleSheet,
+ Button,
+ useAnimatedValue,
+} from 'react-native';
+
+const App = () => {
+ // fadeAnim will be used as the value for opacity. Initial Value: 0
+ const fadeAnim = useAnimatedValue(0);
+
+ const fadeIn = () => {
+ // Will change fadeAnim value to 1 in 5 seconds
+ Animated.timing(fadeAnim, {
+ toValue: 1,
+ duration: 5000,
+ useNativeDriver: true,
+ }).start();
+ };
+
+ const fadeOut = () => {
+ // Will change fadeAnim value to 0 in 3 seconds
+ Animated.timing(fadeAnim, {
+ toValue: 0,
+ duration: 3000,
+ useNativeDriver: true,
+ }).start();
+ };
+
+ return (
+
+
+
+ Fading View!
+
+
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ fadingContainer: {
+ padding: 20,
+ backgroundColor: 'powderblue',
+ },
+ fadingText: {
+ fontSize: 28,
+ },
+ buttonRow: {
+ flexBasis: 100,
+ justifyContent: 'space-evenly',
+ marginVertical: 16,
+ },
+});
+
+export default App;
+```
+
+Refer to the [Animations](animations#animated-api) guide to see additional examples of `Animated` in action.
+
+## Overview
+
+There are two value types you can use with `Animated`:
+
+- [`Animated.Value()`](animated#value) for single values
+- [`Animated.ValueXY()`](animated#valuexy) for vectors
+
+`Animated.Value` can bind to style properties or other props, and can be interpolated as well. A single `Animated.Value` can drive any number of properties.
+
+### Configuring animations
+
+`Animated` provides three types of animation types. Each animation type provides a particular animation curve that controls how your values animate from their initial value to the final value:
+
+- [`Animated.decay()`](animated#decay) starts with an initial velocity and gradually slows to a stop.
+- [`Animated.spring()`](animated#spring) provides a basic spring physics model.
+- [`Animated.timing()`](animated#timing) animates a value over time using [easing functions](easing).
+
+In most cases, you will be using `timing()`. By default, it uses a symmetric easeInOut curve that conveys the gradual acceleration of an object to full speed and concludes by gradually decelerating to a stop.
+
+### Working with animations
+
+Animations are started by calling `start()` on your animation. `start()` takes a completion callback that will be called when the animation is done. If the animation finished running normally, the completion callback will be invoked with `{finished: true}`. If the animation is done because `stop()` was called on it before it could finish (e.g. because it was interrupted by a gesture or another animation), then it will receive `{finished: false}`.
+
+```tsx
+Animated.timing({}).start(({finished}) => {
+ /* completion callback */
+});
+```
+
+### Using the native driver
+
+By using the native driver, we send everything about the animation to native before starting the animation, allowing native code to perform the animation on the UI thread without having to go through the bridge on every frame. Once the animation has started, the JS thread can be blocked without affecting the animation.
+
+You can use the native driver by specifying `useNativeDriver: true` in your animation configuration. See the [Animations](animations#using-the-native-driver) guide to learn more.
+
+### Animatable components
+
+Only animatable components can be animated. These unique components do the magic of binding the animated values to the properties, and do targeted native updates to avoid the cost of the React render and reconciliation process on every frame. They also handle cleanup on unmount so they are safe by default.
+
+- [`createAnimatedComponent()`](animated#createanimatedcomponent) can be used to make a component animatable.
+
+`Animated` exports the following animatable components using the above wrapper:
+
+- `Animated.Image`
+- `Animated.ScrollView`
+- `Animated.Text`
+- `Animated.View`
+- `Animated.FlatList`
+- `Animated.SectionList`
+
+### Composing animations
+
+Animations can also be combined in complex ways using composition functions:
+
+- [`Animated.delay()`](animated#delay) starts an animation after a given delay.
+- [`Animated.parallel()`](animated#parallel) starts a number of animations at the same time.
+- [`Animated.sequence()`](animated#sequence) starts the animations in order, waiting for each to complete before starting the next.
+- [`Animated.stagger()`](animated#stagger) starts animations in order and in parallel, but with successive delays.
+
+Animations can also be chained together by setting the `toValue` of one animation to be another `Animated.Value`. See [Tracking dynamic values](animations#tracking-dynamic-values) in the Animations guide.
+
+By default, if one animation is stopped or interrupted, then all other animations in the group are also stopped.
+
+### Combining animated values
+
+You can combine two animated values via addition, subtraction, multiplication, division, or modulo to make a new animated value:
+
+- [`Animated.add()`](animated#add)
+- [`Animated.subtract()`](animated#subtract)
+- [`Animated.divide()`](animated#divide)
+- [`Animated.modulo()`](animated#modulo)
+- [`Animated.multiply()`](animated#multiply)
+
+### Interpolation
+
+The `interpolate()` function allows input ranges to map to different output ranges. By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value. It uses linear interpolation by default but also supports easing functions.
+
+- [`interpolate()`](animatedvalue#interpolate)
+
+Read more about interpolation in the [Animation](animations#interpolation) guide.
+
+### Handling gestures and other events
+
+Gestures, like panning or scrolling, and other events can map directly to animated values using `Animated.event()`. This is done with a structured map syntax so that values can be extracted from complex event objects. The first level is an array to allow mapping across multiple args, and that array contains nested objects.
+
+- [`Animated.event()`](animated#event)
+
+For example, when working with horizontal scrolling gestures, you would do the following in order to map `event.nativeEvent.contentOffset.x` to `scrollX` (an `Animated.Value`):
+
+```tsx
+ onScroll={Animated.event(
+ // scrollX = e.nativeEvent.contentOffset.x
+ [{nativeEvent: {
+ contentOffset: {
+ x: scrollX
+ }
+ }
+ }]
+ )}
+```
+
+---
+
+# Reference
+
+## Methods
+
+When the given value is a ValueXY instead of a Value, each config option may be a vector of the form `{x: ..., y: ...}` instead of a scalar.
+
+### `decay()`
+
+```tsx
+static decay(value, config): CompositeAnimation;
+```
+
+Animates a value from an initial velocity to zero based on a decay coefficient.
+
+Config is an object that may have the following options:
+
+- `velocity`: Initial velocity. Required.
+- `deceleration`: Rate of decay. Default 0.997.
+- `isInteraction`: Whether or not this animation creates an "interaction handle" on the `InteractionManager`. Default true.
+- `useNativeDriver`: Uses the native driver when true. Required.
+
+---
+
+### `timing()`
+
+```tsx
+static timing(value, config): CompositeAnimation;
+```
+
+Animates a value along a timed easing curve. The [`Easing`](easing) module has tons of predefined curves, or you can use your own function.
+
+Config is an object that may have the following options:
+
+- `duration`: Length of animation (milliseconds). Default 500.
+- `easing`: Easing function to define curve. Default is `Easing.inOut(Easing.ease)`.
+- `delay`: Start the animation after delay (milliseconds). Default 0.
+- `isInteraction`: Whether or not this animation creates an "interaction handle" on the `InteractionManager`. Default true.
+- `useNativeDriver`: Uses the native driver when true. Required.
+
+---
+
+### `spring()`
+
+```tsx
+static spring(value, config): CompositeAnimation;
+```
+
+Animates a value according to an analytical spring model based on [damped harmonic oscillation](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator). Tracks velocity state to create fluid motions as the `toValue` updates, and can be chained together.
+
+Config is an object that may have the following options.
+
+Note that you can only define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one:
+
+The friction/tension or bounciness/speed options match the spring model in [`Facebook Pop`](https://github.com/facebook/pop), [Rebound](https://github.com/facebookarchive/rebound), and [Origami](https://origami.design/).
+
+- `friction`: Controls "bounciness"/overshoot. Default 7.
+- `tension`: Controls speed. Default 40.
+- `speed`: Controls speed of the animation. Default 12.
+- `bounciness`: Controls bounciness. Default 8.
+
+Specifying stiffness/damping/mass as parameters makes `Animated.spring` use an analytical spring model based on the motion equations of a [damped harmonic oscillator](https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator). This behavior is slightly more precise and faithful to the physics behind spring dynamics, and closely mimics the implementation in iOS's CASpringAnimation.
+
+- `stiffness`: The spring stiffness coefficient. Default 100.
+- `damping`: Defines how the spring’s motion should be damped due to the forces of friction. Default 10.
+- `mass`: The mass of the object attached to the end of the spring. Default 1.
+
+Other configuration options are as follows:
+
+- `velocity`: The initial velocity of the object attached to the spring. Default 0 (object is at rest).
+- `overshootClamping`: Boolean indicating whether the spring should be clamped and not bounce. Default false.
+- `restDisplacementThreshold`: The threshold of displacement from rest below which the spring should be considered at rest. Default 0.001.
+- `restSpeedThreshold`: The speed at which the spring should be considered at rest in pixels per second. Default 0.001.
+- `delay`: Start the animation after delay (milliseconds). Default 0.
+- `isInteraction`: Whether or not this animation creates an "interaction handle" on the `InteractionManager`. Default true.
+- `useNativeDriver`: Uses the native driver when true. Required.
+
+---
+
+### `add()`
+
+```tsx
+static add(a: Animated, b: Animated): AnimatedAddition;
+```
+
+Creates a new Animated value composed from two Animated values added together.
+
+---
+
+### `subtract()`
+
+```tsx
+static subtract(a: Animated, b: Animated): AnimatedSubtraction;
+```
+
+Creates a new Animated value composed by subtracting the second Animated value from the first Animated value.
+
+---
+
+### `divide()`
+
+```tsx
+static divide(a: Animated, b: Animated): AnimatedDivision;
+```
+
+Creates a new Animated value composed by dividing the first Animated value by the second Animated value.
+
+---
+
+### `multiply()`
+
+```tsx
+static multiply(a: Animated, b: Animated): AnimatedMultiplication;
+```
+
+Creates a new Animated value composed from two Animated values multiplied together.
+
+---
+
+### `modulo()`
+
+```tsx
+static modulo(a: Animated, modulus: number): AnimatedModulo;
+```
+
+Creates a new Animated value that is the (non-negative) modulo of the provided Animated value
+
+---
+
+### `diffClamp()`
+
+```tsx
+static diffClamp(a: Animated, min: number, max: number): AnimatedDiffClamp;
+```
+
+Create a new Animated value that is limited between 2 values. It uses the difference between the last value so even if the value is far from the bounds it will start changing when the value starts getting closer again. (`value = clamp(value + diff, min, max)`).
+
+This is useful with scroll events, for example, to show the navbar when scrolling up and to hide it when scrolling down.
+
+---
+
+### `delay()`
+
+```tsx
+static delay(time: number): CompositeAnimation;
+```
+
+Starts an animation after the given delay.
+
+---
+
+### `sequence()`
+
+```tsx
+static sequence(animations: CompositeAnimation[]): CompositeAnimation;
+```
+
+Starts an array of animations in order, waiting for each to complete before starting the next. If the current running animation is stopped, no following animations will be started.
+
+---
+
+### `parallel()`
+
+```tsx
+static parallel(
+ animations: CompositeAnimation[],
+ config?: ParallelConfig
+): CompositeAnimation;
+```
+
+Starts an array of animations all at the same time. By default, if one of the animations is stopped, they will all be stopped. You can override this with the `stopTogether` flag.
+
+---
+
+### `stagger()`
+
+```tsx
+static stagger(
+ time: number,
+ animations: CompositeAnimation[]
+): CompositeAnimation;
+```
+
+Array of animations may run in parallel (overlap), but are started in sequence with successive delays. Nice for doing trailing effects.
+
+---
+
+### `loop()`
+
+```tsx
+static loop(
+ animation: CompositeAnimation[],
+ config?: LoopAnimationConfig
+): CompositeAnimation;
+```
+
+Loops a given animation continuously, so that each time it reaches the end, it resets and begins again from the start. Will loop without blocking the JS thread if the child animation is set to `useNativeDriver: true`. In addition, loops can prevent `VirtualizedList`-based components from rendering more rows while the animation is running. You can pass `isInteraction: false` in the child animation config to fix this.
+
+Config is an object that may have the following options:
+
+- `iterations`: Number of times the animation should loop. Default `-1` (infinite).
+
+---
+
+### `event()`
+
+```tsx
+static event(
+ argMapping: Mapping[],
+ config?: EventConfig
+): (...args: any[]) => void;
+```
+
+Takes an array of mappings and extracts values from each arg accordingly, then calls `setValue` on the mapped outputs. e.g.
+
+```tsx
+onScroll={Animated.event(
+ [{nativeEvent: {contentOffset: {x: this._scrollX}}}],
+ {listener: (event: ScrollEvent) => console.log(event)}, // Optional async listener
+)}
+ ...
+onPanResponderMove: Animated.event(
+ [
+ null, // raw event arg ignored
+ {dx: this._panX},
+ ], // gestureState arg
+ {
+ listener: (
+ event: GestureResponderEvent,
+ gestureState: PanResponderGestureState
+ ) => console.log(event, gestureState),
+ } // Optional async listener
+);
+```
+
+Config is an object that may have the following options:
+
+- `listener`: Optional async listener.
+- `useNativeDriver`: Uses the native driver when true. Required.
+
+---
+
+### `forkEvent()`
+
+```jsx
+static forkEvent(event: AnimatedEvent, listener: Function): AnimatedEvent;
+```
+
+Advanced imperative API for snooping on animated events that are passed in through props. It permits to add a new javascript listener to an existing `AnimatedEvent`. If `animatedEvent` is a javascript listener, it will merge the 2 listeners into a single one, and if `animatedEvent` is null/undefined, it will assign the javascript listener directly. Use values directly where possible.
+
+---
+
+### `unforkEvent()`
+
+```jsx
+static unforkEvent(event: AnimatedEvent, listener: Function);
+```
+
+---
+
+### `start()`
+
+```tsx
+static start(callback?: (result: {finished: boolean}) => void);
+```
+
+Animations are started by calling start() on your animation. start() takes a completion callback that will be called when the animation is done or when the animation is done because stop() was called on it before it could finish.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | --------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| callback | `(result: {finished: boolean}) => void` | No | Function that will be called after the animation finished running normally or when the animation is done because stop() was called on it before it could finish |
+
+Start example with callback:
+
+```tsx
+Animated.timing({}).start(({finished}) => {
+ /* completion callback */
+});
+```
+
+---
+
+### `stop()`
+
+```tsx
+static stop();
+```
+
+Stops any running animation.
+
+---
+
+### `reset()`
+
+```tsx
+static reset();
+```
+
+Stops any running animation and resets the value to its original.
+
+## Properties
+
+### `Value`
+
+Standard value class for driving animations. Typically initialized with `useAnimatedValue(0);` or `new Animated.Value(0);` in class components.
+
+You can read more about `Animated.Value` API on the separate [page](animatedvalue).
+
+---
+
+### `ValueXY`
+
+2D value class for driving 2D animations, such as pan gestures.
+
+You can read more about `Animated.ValueXY` API on the separate [page](animatedvaluexy).
+
+---
+
+### `Interpolation`
+
+Exported to use the Interpolation type in flow.
+
+---
+
+### `Node`
+
+Exported for ease of type checking. All animated values derive from this class.
+
+---
+
+### `createAnimatedComponent`
+
+Make any React component Animatable. Used to create `Animated.View`, etc.
+
+---
+
+### `attachNativeEvent`
+
+Imperative API to attach an animated value to an event on a view. Prefer using `Animated.event` with `useNativeDriver: true` if possible.
diff --git a/website/versioned_docs/version-0.86/animatedvalue.md b/website/versioned_docs/version-0.86/animatedvalue.md
new file mode 100644
index 00000000000..189df398ec0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/animatedvalue.md
@@ -0,0 +1,184 @@
+---
+id: animatedvalue
+title: Animated.Value
+---
+
+Standard value for driving animations. One `Animated.Value` can drive multiple properties in a synchronized fashion, but can only be driven by one mechanism at a time. Using a new mechanism (e.g. starting a new animation, or calling `setValue`) will stop any previous ones.
+
+Typically initialized with `useAnimatedValue(0);` or `new Animated.Value(0);` in class components.
+
+---
+
+# Reference
+
+## Methods
+
+### `setValue()`
+
+```tsx
+setValue(value: number);
+```
+
+Directly set the value. This will stop any animations running on the value and update all the bound properties.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----- | ------ | -------- | ----------- |
+| value | number | Yes | Value |
+
+---
+
+### `setOffset()`
+
+```tsx
+setOffset(offset: number);
+```
+
+Sets an offset that is applied on top of whatever value is set, whether via `setValue`, an animation, or `Animated.event`. Useful for compensating things like the start of a pan gesture.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ------------ |
+| offset | number | Yes | Offset value |
+
+---
+
+### `flattenOffset()`
+
+```tsx
+flattenOffset();
+```
+
+Merges the offset value into the base value and resets the offset to zero. The final output of the value is unchanged.
+
+---
+
+### `extractOffset()`
+
+```tsx
+extractOffset();
+```
+
+Sets the offset value to the base value, and resets the base value to zero. The final output of the value is unchanged.
+
+---
+
+### `addListener()`
+
+```tsx
+addListener(callback: (state: {value: number}) => void): string;
+```
+
+Adds an asynchronous listener to the value so you can observe updates from animations. This is useful because there is no way to synchronously read the value because it might be driven natively.
+
+Returns a string that serves as an identifier for the listener.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------------------------------------------------- |
+| callback | function | Yes | The callback function which will receive an object with a `value` key set to the new value. |
+
+---
+
+### `removeListener()`
+
+```tsx
+removeListener(id: string);
+```
+
+Unregister a listener. The `id` param shall match the identifier previously returned by `addListener()`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ---------------------------------- |
+| id | string | Yes | Id for the listener being removed. |
+
+---
+
+### `removeAllListeners()`
+
+```tsx
+removeAllListeners();
+```
+
+Remove all registered listeners.
+
+---
+
+### `stopAnimation()`
+
+```tsx
+stopAnimation(callback?: (value: number) => void);
+```
+
+Stops any running animation or tracking. `callback` is invoked with the final value after stopping the animation, which is useful for updating state to match the animation position with layout.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | --------------------------------------------- |
+| callback | function | No | A function that will receive the final value. |
+
+---
+
+### `resetAnimation()`
+
+```tsx
+resetAnimation(callback?: (value: number) => void);
+```
+
+Stops any animation and resets the value to its original.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------ |
+| callback | function | No | A function that will receive the original value. |
+
+---
+
+### `interpolate()`
+
+```tsx
+interpolate(config: InterpolationConfigType);
+```
+
+Interpolates the value before updating the property, e.g. mapping 0-1 to 0-10.
+
+See `AnimatedInterpolation.js`
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------- |
+| config | object | Yes | See below. |
+
+The `config` object is composed of the following keys:
+
+- `inputRange`: an array of numbers
+- `outputRange`: an array of numbers or strings
+- `easing` (optional): a function that returns a number, given an input number
+- `extrapolate` (optional): a string such as 'extend', 'identity', or 'clamp'
+- `extrapolateLeft` (optional): a string such as 'extend', 'identity', or 'clamp'
+- `extrapolateRight` (optional): a string such as 'extend', 'identity', or 'clamp'
+
+---
+
+### `animate()`
+
+```tsx
+animate(animation, callback);
+```
+
+Typically only used internally, but could be used by a custom Animation class.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| --------- | --------- | -------- | ------------------- |
+| animation | Animation | Yes | See `Animation.js`. |
+| callback | function | Yes | Callback function. |
diff --git a/website/versioned_docs/version-0.86/animatedvaluexy.md b/website/versioned_docs/version-0.86/animatedvaluexy.md
new file mode 100644
index 00000000000..6cb44808ccf
--- /dev/null
+++ b/website/versioned_docs/version-0.86/animatedvaluexy.md
@@ -0,0 +1,227 @@
+---
+id: animatedvaluexy
+title: Animated.ValueXY
+---
+
+2D Value for driving 2D animations, such as pan gestures. Almost identical API to normal [`Animated.Value`](animatedvalue), but multiplexed. Contains two regular `Animated.Value`s under the hood.
+
+## Example
+
+```SnackPlayer name=Animated.ValueXY%20Example
+import React, {useRef} from 'react';
+import {Animated, PanResponder, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DraggableView = () => {
+ const pan = useRef(new Animated.ValueXY()).current;
+
+ const panResponder = PanResponder.create({
+ onStartShouldSetPanResponder: () => true,
+ onPanResponderMove: Animated.event([
+ null,
+ {
+ dx: pan.x, // x,y are Animated.Value
+ dy: pan.y,
+ },
+ ]),
+ onPanResponderRelease: () => {
+ Animated.spring(
+ pan, // Auto-multiplexed
+ {toValue: {x: 0, y: 0}, useNativeDriver: true}, // Back to zero
+ ).start();
+ },
+ });
+
+ return (
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ box: {
+ backgroundColor: '#61dafb',
+ width: 80,
+ height: 80,
+ borderRadius: 4,
+ },
+});
+
+export default DraggableView;
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `setValue()`
+
+```tsx
+setValue(value: {x: number; y: number});
+```
+
+Directly set the value. This will stop any animations running on the value and update all the bound properties.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----- | ------------------------ | -------- | ----------- |
+| value | `{x: number; y: number}` | Yes | Value |
+
+---
+
+### `setOffset()`
+
+```tsx
+setOffset(offset: {x: number; y: number});
+```
+
+Sets an offset that is applied on top of whatever value is set, whether via `setValue`, an animation, or `Animated.event`. Useful for compensating things like the start of a pan gesture.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------------------------ | -------- | ------------ |
+| offset | `{x: number; y: number}` | Yes | Offset value |
+
+---
+
+### `flattenOffset()`
+
+```tsx
+flattenOffset();
+```
+
+Merges the offset value into the base value and resets the offset to zero. The final output of the value is unchanged.
+
+---
+
+### `extractOffset()`
+
+```tsx
+extractOffset();
+```
+
+Sets the offset value to the base value, and resets the base value to zero. The final output of the value is unchanged.
+
+---
+
+### `addListener()`
+
+```tsx
+addListener(callback: (value: {x: number; y: number}) => void);
+```
+
+Adds an asynchronous listener to the value so you can observe updates from animations. This is useful because there is no way to synchronously read the value because it might be driven natively.
+
+Returns a string that serves as an identifier for the listener.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------------------------------------------------- |
+| callback | function | Yes | The callback function which will receive an object with a `value` key set to the new value. |
+
+---
+
+### `removeListener()`
+
+```tsx
+removeListener(id: string);
+```
+
+Unregister a listener. The `id` param shall match the identifier previously returned by `addListener()`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ---------------------------------- |
+| id | string | Yes | Id for the listener being removed. |
+
+---
+
+### `removeAllListeners()`
+
+```tsx
+removeAllListeners();
+```
+
+Remove all registered listeners.
+
+---
+
+### `stopAnimation()`
+
+```tsx
+stopAnimation(callback?: (value: {x: number; y: number}) => void);
+```
+
+Stops any running animation or tracking. `callback` is invoked with the final value after stopping the animation, which is useful for updating state to match the animation position with layout.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | --------------------------------------------- |
+| callback | function | No | A function that will receive the final value. |
+
+---
+
+### `resetAnimation()`
+
+```tsx
+resetAnimation(callback?: (value: {x: number; y: number}) => void);
+```
+
+Stops any animation and resets the value to its original.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------ |
+| callback | function | No | A function that will receive the original value. |
+
+---
+
+### `getLayout()`
+
+```tsx
+getLayout(): {left: Animated.Value, top: Animated.Value};
+```
+
+Converts `{x, y}` into `{left, top}` for use in style, e.g.
+
+```tsx
+style={this.state.anim.getLayout()}
+```
+
+---
+
+### `getTranslateTransform()`
+
+```tsx
+getTranslateTransform(): [
+ {translateX: Animated.Value},
+ {translateY: Animated.Value},
+];
+```
+
+Converts `{x, y}` into a useable translation transform, e.g.
+
+```tsx
+style={{
+ transform: this.state.anim.getTranslateTransform()
+}}
+```
diff --git a/website/versioned_docs/version-0.86/animations.md b/website/versioned_docs/version-0.86/animations.md
new file mode 100644
index 00000000000..ccdaa5a32bb
--- /dev/null
+++ b/website/versioned_docs/version-0.86/animations.md
@@ -0,0 +1,673 @@
+---
+id: animations
+title: Animations
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Animations are very important to create a great user experience. Stationary objects must overcome inertia as they start moving. Objects in motion have momentum and rarely come to a stop immediately. Animations allow you to convey physically believable motion in your interface.
+
+React Native provides two complementary animation systems: [`Animated`](animations#animated-api) for granular and interactive control of specific values, and [`LayoutAnimation`](animations#layoutanimation-api) for animated global layout transactions.
+
+## `Animated` API
+
+The [`Animated`](animated) API is designed to concisely express a wide variety of interesting animation and interaction patterns in a very performant way. `Animated` focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and `start`/`stop` methods to control time-based animation execution.
+
+`Animated` exports six animatable component types: `View`, `Text`, `Image`, `ScrollView`, `FlatList` and `SectionList`, but you can also create your own using `Animated.createAnimatedComponent()`.
+
+For example, a container view that fades in when it is mounted may look like this:
+
+
+
+
+```SnackPlayer ext=js
+import React, {useEffect, useRef} from 'react';
+import {Animated, Text, View} from 'react-native';
+
+const FadeInView = props => {
+ const fadeAnim = useRef(new Animated.Value(0)).current; // Initial value for opacity: 0
+
+ useEffect(() => {
+ Animated.timing(fadeAnim, {
+ toValue: 1,
+ duration: 10000,
+ useNativeDriver: true,
+ }).start();
+ }, [fadeAnim]);
+
+ return (
+
+ {props.children}
+
+ );
+};
+
+// You can then use your `FadeInView` in place of a `View` in your components:
+export default () => {
+ return (
+
+
+
+ Fading in
+
+
+
+ );
+};
+```
+
+
+
+
+```SnackPlayer ext=tsx
+import React, {useEffect, useRef, type PropsWithChildren} from 'react';
+import {Animated, Text, View, type ViewStyle} from 'react-native';
+
+type FadeInViewProps = PropsWithChildren<{style: ViewStyle}>;
+
+const FadeInView: React.FC = props => {
+ const fadeAnim = useRef(new Animated.Value(0)).current; // Initial value for opacity: 0
+
+ useEffect(() => {
+ Animated.timing(fadeAnim, {
+ toValue: 1,
+ duration: 10000,
+ useNativeDriver: true,
+ }).start();
+ }, [fadeAnim]);
+
+ return (
+
+ {props.children}
+
+ );
+};
+
+// You can then use your `FadeInView` in place of a `View` in your components:
+export default () => {
+ return (
+
+
+
+ Fading in
+
+
+
+ );
+};
+```
+
+
+
+
+Let's break down what's happening here. In the `FadeInView` render method, a new `Animated.Value` called `fadeAnim` is initialized with `useRef`. The opacity property on the `View` is mapped to this animated value. Behind the scenes, the numeric value is extracted and used to set opacity.
+
+When the component mounts, the opacity is set to 0. Then, an easing animation is started on the `fadeAnim` animated value, which will update all of its dependent mappings (in this case, only the opacity) on each frame as the value animates to the final value of 1.
+
+This is done in an optimized way that is faster than calling `setState` and re-rendering. Because the entire configuration is declarative, we will be able to implement further optimizations that serialize the configuration and runs the animation on a high-priority thread.
+
+### Configuring animations
+
+Animations are heavily configurable. Custom and predefined easing functions, delays, durations, decay factors, spring constants, and more can all be tweaked depending on the type of animation.
+
+`Animated` provides several animation types, the most commonly used one being [`Animated.timing()`](animated#timing). It supports animating a value over time using one of various predefined easing functions, or you can use your own. Easing functions are typically used in animation to convey gradual acceleration and deceleration of objects.
+
+By default, `timing` will use an easeInOut curve that conveys gradual acceleration to full speed and concludes by gradually decelerating to a stop. You can specify a different easing function by passing an `easing` parameter. Custom `duration` or even a `delay` before the animation starts is also supported.
+
+For example, if we want to create a 2-second long animation of an object that slightly backs up before moving to its final position:
+
+```tsx
+Animated.timing(this.state.xPosition, {
+ toValue: 100,
+ easing: Easing.back(),
+ duration: 2000,
+ useNativeDriver: true,
+}).start();
+```
+
+Take a look at the [Configuring animations](animated#configuring-animations) section of the `Animated` API reference to learn more about all the config parameters supported by the built-in animations.
+
+### Composing animations
+
+Animations can be combined and played in sequence or in parallel. Sequential animations can play immediately after the previous animation has finished, or they can start after a specified delay. The `Animated` API provides several methods, such as `sequence()` and `delay()`, each of which take an array of animations to execute and automatically calls `start()`/`stop()` as needed.
+
+For example, the following animation coasts to a stop, then it springs back while twirling in parallel:
+
+```tsx
+Animated.sequence([
+ // decay, then spring to start and twirl
+ Animated.decay(position, {
+ // coast to a stop
+ velocity: {x: gestureState.vx, y: gestureState.vy}, // velocity from gesture release
+ deceleration: 0.997,
+ useNativeDriver: true,
+ }),
+ Animated.parallel([
+ // after decay, in parallel:
+ Animated.spring(position, {
+ toValue: {x: 0, y: 0}, // return to start
+ useNativeDriver: true,
+ }),
+ Animated.timing(twirl, {
+ // and twirl
+ toValue: 360,
+ useNativeDriver: true,
+ }),
+ ]),
+]).start(); // start the sequence group
+```
+
+If one animation is stopped or interrupted, then all other animations in the group are also stopped. `Animated.parallel` has a `stopTogether` option that can be set to `false` to disable this.
+
+You can find a full list of composition methods in the [Composing animations](animated#composing-animations) section of the `Animated` API reference.
+
+### Combining animated values
+
+You can [combine two animated values](animated#combining-animated-values) via addition, multiplication, division, or modulo to make a new animated value.
+
+There are some cases where an animated value needs to invert another animated value for calculation. An example is inverting a scale (2x --> 0.5x):
+
+```tsx
+const a = new Animated.Value(1);
+const b = Animated.divide(1, a);
+
+Animated.spring(a, {
+ toValue: 2,
+ useNativeDriver: true,
+}).start();
+```
+
+### Interpolation
+
+Each property can be run through an interpolation first. An interpolation maps input ranges to output ranges, typically using a linear interpolation but also supports easing functions. By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value.
+
+A basic mapping to convert a 0-1 range to a 0-100 range would be:
+
+```tsx
+value.interpolate({
+ inputRange: [0, 1],
+ outputRange: [0, 100],
+});
+```
+
+For example, you may want to think about your `Animated.Value` as going from 0 to 1, but animate the position from 150px to 0px and the opacity from 0 to 1. This can be done by modifying `style` from the example above like so:
+
+```tsx
+ style={{
+ opacity: this.state.fadeAnim, // Binds directly
+ transform: [{
+ translateY: this.state.fadeAnim.interpolate({
+ inputRange: [0, 1],
+ outputRange: [150, 0] // 0 : 150, 0.5 : 75, 1 : 0
+ }),
+ }],
+ }}
+```
+
+[`interpolate()`](animated#interpolate) supports multiple range segments as well, which is handy for defining dead zones and other handy tricks. For example, to get a negation relationship at -300 that goes to 0 at -100, then back up to 1 at 0, and then back down to zero at 100 followed by a dead-zone that remains at 0 for everything beyond that, you could do:
+
+```tsx
+value.interpolate({
+ inputRange: [-300, -100, 0, 100, 101],
+ outputRange: [300, 0, 1, 0, 0],
+});
+```
+
+Which would map like so:
+
+```
+Input | Output
+------|-------
+ -400| 450
+ -300| 300
+ -200| 150
+ -100| 0
+ -50| 0.5
+ 0| 1
+ 50| 0.5
+ 100| 0
+ 101| 0
+ 200| 0
+```
+
+`interpolate()` also supports mapping to strings, allowing you to animate colors as well as values with units. For example, if you wanted to animate a rotation you could do:
+
+```tsx
+value.interpolate({
+ inputRange: [0, 360],
+ outputRange: ['0deg', '360deg'],
+});
+```
+
+`interpolate()` also supports arbitrary easing functions, many of which are already implemented in the [`Easing`](easing) module. `interpolate()` also has configurable behavior for extrapolating the `outputRange`. You can set the extrapolation by setting the `extrapolate`, `extrapolateLeft`, or `extrapolateRight` options. The default value is `extend` but you can use `clamp` to prevent the output value from exceeding `outputRange`.
+
+### Tracking dynamic values
+
+Animated values can also track other values by setting the `toValue` of an animation to another animated value instead of a plain number. For example, a "Chat Heads" animation like the one used by Messenger on Android could be implemented with a `spring()` pinned on another animated value, or with `timing()` and a `duration` of 0 for rigid tracking. They can also be composed with interpolations:
+
+```tsx
+Animated.spring(follower, {toValue: leader}).start();
+Animated.timing(opacity, {
+ toValue: pan.x.interpolate({
+ inputRange: [0, 300],
+ outputRange: [1, 0],
+ }),
+ useNativeDriver: true,
+}).start();
+```
+
+The `leader` and `follower` animated values would be implemented using `Animated.ValueXY()`. `ValueXY` is a handy way to deal with 2D interactions, such as panning or dragging. It is a basic wrapper that contains two `Animated.Value` instances and some helper functions that call through to them, making `ValueXY` a drop-in replacement for `Value` in many cases. It allows us to track both x and y values in the example above.
+
+### Tracking gestures
+
+Gestures, like panning or scrolling, and other events can map directly to animated values using [`Animated.event`](animated#event). This is done with a structured map syntax so that values can be extracted from complex event objects. The first level is an array to allow mapping across multiple args, and that array contains nested objects.
+
+For example, when working with horizontal scrolling gestures, you would do the following in order to map `event.nativeEvent.contentOffset.x` to `scrollX` (an `Animated.Value`):
+
+```tsx
+ onScroll={Animated.event(
+ // scrollX = e.nativeEvent.contentOffset.x
+ [{nativeEvent: {
+ contentOffset: {
+ x: scrollX
+ }
+ }
+ }]
+ )}
+```
+
+The following example implements a horizontal scrolling carousel where the scroll position indicators are animated using the `Animated.event` used in the `ScrollView`
+
+#### ScrollView with Animated Event Example
+
+```SnackPlayer name=Animated&supportedPlatforms=ios,android
+import React from 'react';
+import {
+ ScrollView,
+ Text,
+ StyleSheet,
+ View,
+ ImageBackground,
+ Animated,
+ useWindowDimensions,
+ useAnimatedValue,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const images = new Array(6).fill(
+ 'https://images.unsplash.com/photo-1556740749-887f6717d7e4',
+);
+
+const App = () => {
+ const scrollX = useAnimatedValue(0);
+
+ const {width: windowWidth} = useWindowDimensions();
+
+ return (
+
+
+
+
+ {images.map((image, imageIndex) => {
+ return (
+
+
+
+
+ {'Image - ' + imageIndex}
+
+
+
+
+ );
+ })}
+
+
+ {images.map((image, imageIndex) => {
+ const width = scrollX.interpolate({
+ inputRange: [
+ windowWidth * (imageIndex - 1),
+ windowWidth * imageIndex,
+ windowWidth * (imageIndex + 1),
+ ],
+ outputRange: [8, 16, 8],
+ extrapolate: 'clamp',
+ });
+ return (
+
+ );
+ })}
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ scrollContainer: {
+ height: 300,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ card: {
+ flex: 1,
+ marginVertical: 4,
+ marginHorizontal: 16,
+ borderRadius: 5,
+ overflow: 'hidden',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ textContainer: {
+ backgroundColor: 'rgba(0,0,0, 0.7)',
+ paddingHorizontal: 24,
+ paddingVertical: 8,
+ borderRadius: 5,
+ },
+ infoText: {
+ color: 'white',
+ fontSize: 16,
+ fontWeight: 'bold',
+ },
+ normalDot: {
+ height: 8,
+ width: 8,
+ borderRadius: 4,
+ backgroundColor: 'silver',
+ marginHorizontal: 4,
+ },
+ indicatorContainer: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+});
+
+export default App;
+```
+
+When using `PanResponder`, you could use the following code to extract the x and y positions from `gestureState.dx` and `gestureState.dy`. We use a `null` in the first position of the array, as we are only interested in the second argument passed to the `PanResponder` handler, which is the `gestureState`.
+
+```tsx
+onPanResponderMove={Animated.event(
+ [null, // ignore the native event
+ // extract dx and dy from gestureState
+ // like 'pan.x = gestureState.dx, pan.y = gestureState.dy'
+ {dx: pan.x, dy: pan.y}
+])}
+```
+
+#### PanResponder with Animated Event Example
+
+```SnackPlayer name=Animated
+import React, {useRef} from 'react';
+import {Animated, View, StyleSheet, PanResponder, Text} from 'react-native';
+
+const App = () => {
+ const pan = useRef(new Animated.ValueXY()).current;
+ const panResponder = useRef(
+ PanResponder.create({
+ onMoveShouldSetPanResponder: () => true,
+ onPanResponderMove: Animated.event([null, {dx: pan.x, dy: pan.y}]),
+ onPanResponderRelease: () => {
+ Animated.spring(pan, {
+ toValue: {x: 0, y: 0},
+ useNativeDriver: true,
+ }).start();
+ },
+ }),
+ ).current;
+
+ return (
+
+ Drag & Release this box!
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ titleText: {
+ fontSize: 14,
+ lineHeight: 24,
+ fontWeight: 'bold',
+ },
+ box: {
+ height: 150,
+ width: 150,
+ backgroundColor: 'blue',
+ borderRadius: 5,
+ },
+});
+
+export default App;
+```
+
+### Responding to the current animation value
+
+You may notice that there is no clear way to read the current value while animating. This is because the value may only be known in the native runtime due to optimizations. If you need to run JavaScript in response to the current value, there are two approaches:
+
+- `spring.stopAnimation(callback)` will stop the animation and invoke `callback` with the final value. This is useful when making gesture transitions.
+- `spring.addListener(callback)` will invoke `callback` asynchronously while the animation is running, providing a recent value. This is useful for triggering state changes, for example snapping a bobble to a new option as the user drags it closer, because these larger state changes are less sensitive to a few frames of lag compared to continuous gestures like panning which need to run at 60 fps.
+
+`Animated` is designed to be fully serializable so that animations can be run in a high performance way, independent of the normal JavaScript event loop. This does influence the API, so keep that in mind when it seems a little trickier to do something compared to a fully synchronous system. Check out `Animated.Value.addListener` as a way to work around some of these limitations, but use it sparingly since it might have performance implications in the future.
+
+### Using the native driver
+
+The `Animated` API is designed to be serializable. By using the [native driver](/blog/2017/02/14/using-native-driver-for-animated), we send everything about the animation to native before starting the animation, allowing native code to perform the animation on the UI thread without having to go through the bridge on every frame. Once the animation has started, the JS thread can be blocked without affecting the animation.
+
+Using the native driver for normal animations can be accomplished by setting `useNativeDriver: true` in animation config when starting it. Animations without a `useNativeDriver` property will default to false for legacy reasons, but emit a warning (and typechecking error in TypeScript).
+
+```tsx
+Animated.timing(this.state.animatedValue, {
+ toValue: 1,
+ duration: 500,
+ useNativeDriver: true, // <-- Set this to true
+}).start();
+```
+
+Animated values are only compatible with one driver so if you use native driver when starting an animation on a value, make sure every animation on that value also uses the native driver.
+
+The native driver also works with `Animated.event`. This is especially useful for animations that follow the scroll position as without the native driver, the animation will always run a frame behind the gesture due to the async nature of React Native.
+
+```tsx
+
+ {content}
+
+```
+
+You can see the native driver in action by running the [RNTester app](https://github.com/facebook/react-native/blob/main/packages/rn-tester/), then loading the Native Animated Example. You can also take a look at the [source code](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/NativeAnimation/NativeAnimationsExample.js) to learn how these examples were produced.
+
+#### Caveats
+
+Not everything you can do with `Animated` is currently supported by the native driver. The main limitation is that you can only animate non-layout properties: things like `transform` and `opacity` will work, but Flexbox and position properties will not. When using `Animated.event`, it will only work with direct events and not bubbling events. This means it does not work with `PanResponder` but does work with things like `ScrollView#onScroll`.
+
+When an animation is running, it can prevent `VirtualizedList` components from rendering more rows. If you need to run a long or looping animation while the user is scrolling through a list, you can use `isInteraction: false` in your animation's config to prevent this issue.
+
+### Bear in mind
+
+While using transform styles such as `rotateY`, `rotateX`, and others ensure the transform style `perspective` is in place. At this time some animations may not render on Android without it. Example below.
+
+```tsx
+
+```
+
+### Additional examples
+
+The RNTester app has various examples of `Animated` in use:
+
+- [AnimatedGratuitousApp](https://github.com/facebook/react-native/tree/main/packages/rn-tester/js/examples/AnimatedGratuitousApp)
+- [NativeAnimationsExample](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/NativeAnimation/NativeAnimationsExample.js)
+
+## `LayoutAnimation` API
+
+`LayoutAnimation` allows you to globally configure `create` and `update` animations that will be used for all views in the next render/layout cycle. This is useful for doing Flexbox layout updates without bothering to measure or calculate specific properties in order to animate them directly, and is especially useful when layout changes may affect ancestors, for example a "see more" expansion that also increases the size of the parent and pushes down the row below which would otherwise require explicit coordination between the components in order to animate them all in sync.
+
+Note that although `LayoutAnimation` is very powerful and can be quite useful, it provides much less control than `Animated` and other animation libraries, so you may need to use another approach if you can't get `LayoutAnimation` to do what you want.
+
+Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
+
+```tsx
+UIManager.setLayoutAnimationEnabledExperimental(true);
+```
+
+```SnackPlayer name=LayoutAnimations
+import React, {useState} from 'react';
+import {
+ NativeModules,
+ LayoutAnimation,
+ Text,
+ TouchableOpacity,
+ StyleSheet,
+ View,
+} from 'react-native';
+
+const {UIManager} = NativeModules;
+
+UIManager.setLayoutAnimationEnabledExperimental &&
+ UIManager.setLayoutAnimationEnabledExperimental(true);
+
+export default function App() {
+ const [state, setState] = useState({
+ w: 100,
+ h: 100,
+ });
+
+ const onPress = () => {
+ // Animate the update
+ LayoutAnimation.spring();
+ setState({w: state.w + 15, h: state.h + 15});
+ };
+
+ return (
+
+
+
+
+ Press me!
+
+
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ box: {
+ width: 200,
+ height: 200,
+ backgroundColor: 'red',
+ },
+ button: {
+ backgroundColor: 'black',
+ paddingHorizontal: 20,
+ paddingVertical: 15,
+ marginTop: 15,
+ },
+ buttonText: {
+ color: '#fff',
+ fontWeight: 'bold',
+ },
+});
+```
+
+This example uses a preset value, you can customize the animations as you need, see [LayoutAnimation.js](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js) for more information.
+
+## Additional notes
+
+### `requestAnimationFrame`
+
+`requestAnimationFrame` is a polyfill from the browser that you might be familiar with. It accepts a function as its only argument and calls that function before the next repaint. It is an essential building block for animations that underlies all of the JavaScript-based animation APIs. In general, you shouldn't need to call this yourself - the animation APIs will manage frame updates for you.
+
+### `setNativeProps`
+
+As mentioned [in the Direct Manipulation section](legacy/direct-manipulation), `setNativeProps` allows us to modify properties of native-backed components (components that are actually backed by native views, unlike composite components) directly, without having to `setState` and re-render the component hierarchy.
+
+We could use this in the Rebound example to update the scale - this might be helpful if the component that we are updating is deeply nested and hasn't been optimized with `shouldComponentUpdate`.
+
+If you find your animations with dropping frames (performing below 60 frames per second), look into using `setNativeProps` or `shouldComponentUpdate` to optimize them. Or you could run the animations on the UI thread rather than the JavaScript thread [with the useNativeDriver option](/blog/2017/02/14/using-native-driver-for-animated). You may also want to defer any computationally intensive work until after animations are complete, using the [InteractionManager](interactionmanager). You can monitor the frame rate by using the In-App Dev Menu "FPS Monitor" tool.
diff --git a/website/versioned_docs/version-0.86/app-extensions.md b/website/versioned_docs/version-0.86/app-extensions.md
new file mode 100644
index 00000000000..8ef194ef75a
--- /dev/null
+++ b/website/versioned_docs/version-0.86/app-extensions.md
@@ -0,0 +1,24 @@
+---
+id: app-extensions
+title: App Extensions
+---
+
+App extensions let you provide custom functionality and content outside of your main app. There are different types of app extensions on iOS, and they are all covered in the [App Extension Programming Guide](https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/index.html#//apple_ref/doc/uid/TP40014214-CH20-SW1). In this guide, we'll briefly cover how you may take advantage of app extensions on iOS.
+
+## Memory use in extensions
+
+As these extensions are loaded outside of the regular app sandbox, it's highly likely that several of these app extensions will be loaded simultaneously. As you might expect, these extensions have small memory usage limits. Keep these in mind when developing your app extensions. It's always highly recommended to test your application on an actual device, and more so when developing app extensions: too frequently, developers find that their extension works fine in the iOS Simulator, only to get user reports that their extension is not loading on actual devices.
+
+### Today widget
+
+The memory limit of a Today widget is 16 MB. As it happens, Today widget implementations using React Native may work unreliably because the memory usage tends to be too high. You can tell if your Today widget is exceeding the memory limit if it yields the message 'Unable to Load':
+
+
+
+Always make sure to test your app extensions in a real device, but be aware that this may not be sufficient, especially when dealing with Today widgets. Debug-configured builds are more likely to exceed the memory limits, while release-configured builds don't fail right away. We highly recommend that you use [Xcode's Instruments](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/index.html) to analyze your real world memory usage, as it's very likely that your release-configured build is very close to the 16 MB limit. In situations like these, you can quickly go over the 16 MB limit by performing common operations, such as fetching data from an API.
+
+To experiment with the limits of React Native Today widget implementations, try extending the example project in [react-native-today-widget](https://github.com/matejkriz/react-native-today-widget/).
+
+### Other app extensions
+
+Other types of app extensions have greater memory limits than the Today widget. For instance, Custom Keyboard extensions are limited to 48 MB, and Share extensions are limited to 120 MB. Implementing such app extensions with React Native is more viable. One proof of concept example is [react-native-ios-share-extension](https://github.com/andrewsardone/react-native-ios-share-extension).
diff --git a/website/versioned_docs/version-0.86/appearance.md b/website/versioned_docs/version-0.86/appearance.md
new file mode 100644
index 00000000000..44f16750db0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/appearance.md
@@ -0,0 +1,128 @@
+---
+id: appearance
+title: Appearance
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+```tsx
+import {Appearance} from 'react-native';
+```
+
+The `Appearance` module exposes information about the user's appearance preferences, such as their preferred system color scheme (light or dark).
+
+#### Developer notes
+
+
+
+
+
+:::info
+The `Appearance` API is inspired by the [Media Queries draft](https://drafts.csswg.org/mediaqueries-5/) from the W3C. The color scheme preference is modeled after the [`prefers-color-scheme` CSS media feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme).
+:::
+
+
+
+
+:::info
+The color scheme preference will map to the user's Light or [Dark theme](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme) preference on Android 10 (API level 29) devices and higher.
+:::
+
+
+
+
+:::info
+The color scheme preference will map to the user's Light or [Dark Mode](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/dark-mode/) preference on iOS 13 devices and higher.
+:::
+
+:::note
+When taking a screenshot, by default, the color scheme may flicker between light and dark mode. It happens because the iOS takes snapshots on both color schemes and updating the user interface with color scheme is asynchronous.
+:::
+
+
+
+
+## Example
+
+You can use the `Appearance` module to determine if the user prefers a dark color scheme:
+
+```tsx
+const colorScheme = Appearance.getColorScheme();
+if (colorScheme === 'dark') {
+ // Use dark color scheme
+}
+```
+
+Although the color scheme is available immediately, this may change when not overridden via `setColorScheme()` (e.g. scheduled color scheme change at sunrise or sunset). Any rendering logic or styles that depend on the user preferred color scheme should try to call this function on every render, rather than caching the value.
+
+**Recommended:** Use the [`useColorScheme`](usecolorscheme) hook.
+
+### App-level overriding
+
+`setColorScheme()` overrides the color scheme at the application level — it does not affect the system setting or other applications. Passing `'unspecified'` removes any override, restoring the system preference.
+
+```mermaid
+flowchart TD
+ USC["useColorScheme()"] --> GCS["getColorScheme()"]
+ GCS --> DEC{App override?}
+ DEC -- "NO / reset via setColorScheme('unspecified')" --> SYS["System preference\n'light' or 'dark'"]
+ DEC -- "YES — setColorScheme('light' | 'dark')" --> OVR["'light' or 'dark' (static)"]
+
+ classDef fn fill:#dce8f8,stroke:#4a90d9,color:#1a1a1a
+ classDef out fill:#f0f4f8,stroke:#8faabb,color:#1a1a1a
+ class USC,GCS fn
+ class OVR,SYS out
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `getColorScheme()`
+
+```tsx
+static getColorScheme(): 'light' | 'dark' | 'unspecified' | null;
+```
+
+Returns the active color scheme. This value may change at runtime, either at the system level (e.g. scheduled color scheme change at sunrise or sunset) or when overridden at the app level via `setColorScheme()`.
+
+Return values:
+
+- `'light'`: The light color scheme is applied.
+- `'dark'`: The dark color scheme is applied.
+- `'unspecified'`: **_Never returned_** (incorrectly typed).
+- `null`: May be returned if the native Appearance module is not available.
+
+See also: [`useColorScheme`](usecolorscheme) (hook).
+
+---
+
+### `setColorScheme()`
+
+```tsx
+static setColorScheme('light' | 'dark' | 'unspecified'): void;
+```
+
+Forces the application to always adopt a light or dark interface style. The change applies to the application and all native elements within it (Alerts, Pickers, etc.).
+
+This is an app-level override — it does not affect the system's selected interface style or any style set in other applications.
+
+Supported values:
+
+- `'light'`: Apply light color scheme.
+- `'dark'`: Apply dark color scheme.
+- `'unspecified'`: Follow the system color scheme (removes any override).
+
+---
+
+### `addChangeListener()`
+
+```tsx
+static addChangeListener(
+ listener: (preferences: {colorScheme: 'light' | 'dark' | null}) => void,
+): NativeEventSubscription;
+```
+
+Add an event handler that is fired when appearance preferences change. On iOS and Android, the `colorScheme` value in the callback is always `'light'` or `'dark'`.
diff --git a/website/versioned_docs/version-0.86/appendix.md b/website/versioned_docs/version-0.86/appendix.md
new file mode 100644
index 00000000000..81045b2e932
--- /dev/null
+++ b/website/versioned_docs/version-0.86/appendix.md
@@ -0,0 +1,36 @@
+# Appendix
+
+## I. Terminology
+
+- **Spec** - TypeScript or Flow code that describes the API for a Turbo Native Module or Fabric Native component. Used by **Codegen** to generate boilerplate code.
+
+- **Native Modules** - Native libraries that have no User Interface (UI) for the user. Examples would be persistent storage, notifications, network events. These are accessible to your JavaScript application code as functions and objects.
+- **Native Component** - Native platform views that are available to your application JavaScript code through React Components.
+
+- **Legacy Native Components** - Components which are running on the old React Native architecture.
+- **Legacy Native Modules** - Modules which are running on the old React Native architecture.
+
+## II. Codegen Typings
+
+You may use the following table as a reference for which types are supported and what they map to in each platform:
+
+| Flow | TypeScript | Flow Nullable Support | TypeScript Nullable Support | Android (Java) | iOS (ObjC) |
+| -------------------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------- | ------------------------------------ | -------------------------------------------------------------- |
+| `string` | `string` | `?string` | string | null | `string` | `NSString` |
+| `boolean` | `boolean` | `?boolean` | boolean | null | `Boolean` | `NSNumber` |
+| Object Literal {| foo: string, ...|} | { foo: string, ...} as const | ?{| foo: string, ...|} | ?{ foo: string, ...} as const | \- | \- |
+| Object [[1](#notes)] | Object [[1](#notes)] | `?Object` | Object | null | `ReadableMap` | `@` (untyped dictionary) |
+| Array<T> | Array<T> | ?Array<T> | Array<T> | null | `ReadableArray` | `NSArray` (or `RCTConvertVecToArray` when used inside objects) |
+| `Function` | `Function` | `?Function` | Function | null | \- | \- |
+| Promise<T> | Promise<T> | ?Promise<T> | Promise<T> | null | `com.facebook.react.bridge.Promise` | `RCTPromiseResolve` and `RCTPromiseRejectBlock` |
+| Type Unions 'SUCCESS'|'FAIL' | Type Unions 'SUCCESS'|'FAIL' | Only as callbacks | | \- | \- |
+| Callbacks `() =>` | Callbacks `() =>` | Yes | | `com.facebook.react.bridge.Callback` | `RCTResponseSenderBlock` |
+| `number` | `number` | No | | `double` | `NSNumber` |
+
+### Notes:
+
+[1] We strongly recommend using Object literals instead of Objects.
+
+:::info
+You may also find it useful to refer to the JavaScript specifications for the core modules in React Native. These are located inside the `Libraries/` directory in the React Native repository.
+:::
diff --git a/website/versioned_docs/version-0.86/appregistry.md b/website/versioned_docs/version-0.86/appregistry.md
new file mode 100644
index 00000000000..62ba81a928a
--- /dev/null
+++ b/website/versioned_docs/version-0.86/appregistry.md
@@ -0,0 +1,383 @@
+---
+id: appregistry
+title: AppRegistry
+---
+
+
+
Project with Native Code Required
+
If you are using the managed Expo workflow there is only ever one entry component registered with AppRegistry and it is handled automatically (or through registerRootComponent). You do not need to use this API.
+
+
+`AppRegistry` is the JS entry point to running all React Native apps. App root components should register themselves with `AppRegistry.registerComponent`, then the native system can load the bundle for the app and then actually run the app when it's ready by invoking `AppRegistry.runApplication`.
+
+```tsx
+import {Text, AppRegistry} from 'react-native';
+
+const App = () => (
+
+ App1
+
+);
+
+AppRegistry.registerComponent('Appname', () => App);
+```
+
+To "stop" an application when a view should be destroyed, call `AppRegistry.unmountApplicationComponentAtRootTag` with the tag that was passed into `runApplication`. These should always be used as a pair.
+
+`AppRegistry` should be required early in the `require` sequence to make sure the JS execution environment is setup before other modules are required.
+
+---
+
+# Reference
+
+## Methods
+
+### `getAppKeys()`
+
+```tsx
+static getAppKeys(): string[];
+```
+
+Returns an array of strings.
+
+---
+
+### `getRegistry()`
+
+```tsx
+static getRegistry(): {sections: string[]; runnables: Runnable[]};
+```
+
+Returns a [Registry](appregistry#registry) object.
+
+---
+
+### `getRunnable()`
+
+```tsx
+static getRunnable(appKey: string): : Runnable | undefined;
+```
+
+Returns a [Runnable](appregistry#runnable) object.
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ------ |
+| appKey
Required
| string |
+
+---
+
+### `getSectionKeys()`
+
+```tsx
+static getSectionKeys(): string[];
+```
+
+Returns an array of strings.
+
+---
+
+### `getSections()`
+
+```tsx
+static getSections(): Record;
+```
+
+Returns a [Runnables](appregistry#runnables) object.
+
+---
+
+### `registerCancellableHeadlessTask()`
+
+```tsx
+static registerCancellableHeadlessTask(
+ taskKey: string,
+ taskProvider: TaskProvider,
+ taskCancelProvider: TaskCancelProvider,
+);
+```
+
+Register a headless task which can be cancelled. A headless task is a bit of code that runs without a UI.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| taskKey
Required
| string | The native id for this task instance that was used when startHeadlessTask was called. |
+| taskProvider
Required
| [TaskProvider](appregistry#taskprovider) | A promise returning function that takes some data passed from the native side as the only argument. When the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. |
+| taskCancelProvider
Required
| [TaskCancelProvider](appregistry#taskcancelprovider) | a void returning function that takes no arguments; when a cancellation is requested, the function being executed by taskProvider should wrap up and return ASAP. |
+
+---
+
+### `registerComponent()`
+
+```tsx
+static registerComponent(
+ appKey: string,
+ getComponentFunc: ComponentProvider,
+ section?: boolean,
+): string;
+```
+
+**Parameters:**
+
+| Name | Type |
+| ---------------------------------------------------------------------- | ----------------- |
+| appKey
| [AppConfig](appregistry#appconfig)[] |
+
+---
+
+### `registerHeadlessTask()`
+
+```tsx
+static registerHeadlessTask(
+ taskKey: string,
+ taskProvider: TaskProvider,
+);
+```
+
+Register a headless task. A headless task is a bit of code that runs without a UI.
+
+This is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music.
+
+**Parameters:**
+
+| Name | Type | Description |
+| --------------------------------------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| taskKey
Required
| string | The native id for this task instance that was used when startHeadlessTask was called. |
+| taskProvider
Required
| [TaskProvider](appregistry#taskprovider) | A promise returning function that takes some data passed from the native side as the only argument. When the promise is resolved or rejected the native side is notified of this event and it may decide to destroy the JS context. |
+
+---
+
+### `registerRunnable()`
+
+```tsx
+static registerRunnable(appKey: string, func: Runnable): string;
+```
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | -------- |
+| appKey
| function |
+
+A valid `hook` function accepts the following as arguments:
+
+| Name | Type |
+| ---------------------------------------------------------------------------- | ------------------ |
+| component
Required
| ComponentProvider |
+| scopedPerformanceLogger
Required
| IPerformanceLogger |
+
+The function must also return a React Component.
+
+---
+
+### `setWrapperComponentProvider()`
+
+```tsx
+static setWrapperComponentProvider(
+ provider: WrapperComponentProvider,
+);
+```
+
+**Parameters:**
+
+| Name | Type |
+| ------------------------------------------------------------- | ----------------- |
+| provider
| number | The native id for this task instance to keep track of its execution. |
+| taskKey
Required
| string | The key for the task to start. |
+| data
Required
| any | The data to pass to the task. |
+
+---
+
+### `unmountApplicationComponentAtRootTag()`
+
+```tsx
+static unmountApplicationComponentAtRootTag(rootTag: number);
+```
+
+Stops an application when a view should be destroyed.
+
+**Parameters:**
+
+| Name | Type |
+| ------------------------------------------------------------ | ------ |
+| rootTag
Required
| number |
+
+## Type Definitions
+
+### AppConfig
+
+Application configuration for the `registerConfig` method.
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ----------------- |
+| appKey
Required
| string |
+| component | ComponentProvider |
+| run | function |
+| section | boolean |
+
+:::note
+Every config is expected to set either `component` or `run` function.
+:::
+
+### Registry
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type |
+| --------- | ------------------------------------------ |
+| runnables | array of [Runnables](appregistry#runnable) |
+| sections | array of strings |
+
+### Runnable
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type |
+| --------- | ----------------- |
+| component | ComponentProvider |
+| run | function |
+
+### Runnables
+
+An object with key of `appKey` and value of type of [`Runnable`](appregistry#runnable).
+
+| Type |
+| ------ |
+| object |
+
+### Task
+
+A `Task` is a function that accepts any data as argument and returns a Promise that resolves to `undefined`.
+
+| Type |
+| -------- |
+| function |
+
+### TaskCanceller
+
+A `TaskCanceller` is a function that accepts no argument and returns void.
+
+| Type |
+| -------- |
+| function |
+
+### TaskCancelProvider
+
+A valid `TaskCancelProvider` is a function that returns a [`TaskCanceller`](appregistry#taskcanceller).
+
+| Type |
+| -------- |
+| function |
+
+### TaskProvider
+
+A valid `TaskProvider` is a function that returns a [`Task`](appregistry#task).
+
+| Type |
+| -------- |
+| function |
diff --git a/website/versioned_docs/version-0.86/appstate.md b/website/versioned_docs/version-0.86/appstate.md
new file mode 100644
index 00000000000..579a7f30487
--- /dev/null
+++ b/website/versioned_docs/version-0.86/appstate.md
@@ -0,0 +1,121 @@
+---
+id: appstate
+title: AppState
+---
+
+`AppState` can tell you if the app is in the foreground or background, and notify you when the state changes.
+
+AppState is frequently used to determine the intent and proper behavior when handling push notifications.
+
+### App States
+
+- `active` - The app is running in the foreground
+- `background` - The app is running in the background. The user is either:
+ - in another app
+ - on the home screen
+ - [Android] on another `Activity` (even if it was launched by your app)
+- [iOS] `inactive` - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
+
+For more information, see [Apple's documentation](https://developer.apple.com/documentation/uikit/app_and_scenes/managing_your_app_s_life_cycle)
+
+## Basic Usage
+
+To see the current state, you can check `AppState.currentState`, which will be kept up-to-date.
+
+:::info
+If you are using the legacy architecture, `currentState` will be `null` at launch until it is retrieved asynchronously from the native side.
+:::
+
+```SnackPlayer name=AppState%20Example
+import React, {useRef, useState, useEffect} from 'react';
+import {AppState, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const AppStateExample = () => {
+ const appState = useRef(AppState.currentState);
+ const [appStateVisible, setAppStateVisible] = useState(appState.current);
+
+ useEffect(() => {
+ const subscription = AppState.addEventListener('change', nextAppState => {
+ if (
+ appState.current.match(/inactive|background/) &&
+ nextAppState === 'active'
+ ) {
+ console.log('App has come to the foreground!');
+ }
+
+ appState.current = nextAppState;
+ setAppStateVisible(appState.current);
+ console.log('AppState', appState.current);
+ });
+
+ return () => {
+ subscription.remove();
+ };
+ }, []);
+
+ return (
+
+
+ Current state is: {appStateVisible}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default AppStateExample;
+```
+
+This example will only ever appear to say "Current state is: active" because the app is only visible to the user when in the `active` state. If you want to experiment with the code we recommend to use your own device instead of embedded preview.
+
+---
+
+# Reference
+
+## Events
+
+### `change`
+
+This event is received when the app state has changed. The listener is called with one of [the current app state values](appstate#app-states).
+
+### `memoryWarning`
iOS
+
+Fires when the app receives a memory warning from the operating system.
+
+### `focus`
Android
+
+Received when the app gains focus (the user is interacting with the app).
+
+### `blur`
Android
+
+Received when the user is not actively interacting with the app. Useful in situations when the user pulls down the [notification drawer](https://developer.android.com/guide/topics/ui/notifiers/notifications#bar-and-drawer). `AppState` won't change but the `blur` event will get fired.
+
+## Methods
+
+### `addEventListener()`
+
+```tsx
+static addEventListener(
+ type: AppStateEvent,
+ listener: (state: AppStateStatus) => void,
+): NativeEventSubscription;
+```
+
+Sets up a function that will be called whenever the specified event type on AppState occurs. Valid values for `eventType` are
+[listed above](#events). Returns the `EventSubscription`.
+
+## Properties
+
+### `currentState`
+
+```tsx
+static currentState: AppStateStatus;
+```
diff --git a/website/versioned_docs/version-0.86/asyncstorage.md b/website/versioned_docs/version-0.86/asyncstorage.md
new file mode 100644
index 00000000000..e1fb69471fa
--- /dev/null
+++ b/website/versioned_docs/version-0.86/asyncstorage.md
@@ -0,0 +1,8 @@
+---
+id: asyncstorage
+title: '❌ AsyncStorage'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=storage) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/backhandler.md b/website/versioned_docs/version-0.86/backhandler.md
new file mode 100644
index 00000000000..c3c7c937541
--- /dev/null
+++ b/website/versioned_docs/version-0.86/backhandler.md
@@ -0,0 +1,136 @@
+---
+id: backhandler
+title: BackHandler
+---
+
+The Backhandler API detects hardware button presses for back navigation, lets you register event listeners for the system's back action, and lets you control how your application responds. It is Android-only.
+
+The event subscriptions are called in reverse order (i.e. the last registered subscription is called first).
+
+- **If one subscription returns true,** then subscriptions registered earlier will not be called.
+- **If no subscription returns true or none are registered,** it programmatically invokes the default back button functionality to exit the app.
+
+:::warning Warning for modal users
+If your app shows an opened `Modal`, `BackHandler` will not publish any events ([see `Modal` docs](modal#onrequestclose)).
+:::
+
+## Pattern
+
+```tsx
+const subscription = BackHandler.addEventListener(
+ 'hardwareBackPress',
+ function () {
+ /**
+ * this.onMainScreen and this.goBack are just examples,
+ * you need to use your own implementation here.
+ *
+ * Typically you would use the navigator here to go to the last state.
+ */
+
+ if (!this.onMainScreen()) {
+ this.goBack();
+ /**
+ * When true is returned the event will not be bubbled up
+ * & no other back action will execute
+ */
+ return true;
+ }
+ /**
+ * Returning false will let the event to bubble up & let other event listeners
+ * or the system's default back action to be executed.
+ */
+ return false;
+ },
+);
+
+// Unsubscribe the listener on unmount
+subscription.remove();
+```
+
+## Example
+
+The following example implements a scenario where you confirm if the user wants to exit the app:
+
+```SnackPlayer name=BackHandler&supportedPlatforms=android
+import React, {useEffect} from 'react';
+import {Text, StyleSheet, BackHandler, Alert} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ useEffect(() => {
+ const backAction = () => {
+ Alert.alert('Hold on!', 'Are you sure you want to go back?', [
+ {
+ text: 'Cancel',
+ onPress: () => null,
+ style: 'cancel',
+ },
+ {text: 'YES', onPress: () => BackHandler.exitApp()},
+ ]);
+ return true;
+ };
+
+ const backHandler = BackHandler.addEventListener(
+ 'hardwareBackPress',
+ backAction,
+ );
+
+ return () => backHandler.remove();
+ }, []);
+
+ return (
+
+
+ Click Back button!
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ text: {
+ fontSize: 18,
+ fontWeight: 'bold',
+ },
+});
+
+export default App;
+```
+
+`BackHandler.addEventListener` creates an event listener & returns a `NativeEventSubscription` object which should be cleared using `NativeEventSubscription.remove` method.
+
+## Usage with React Navigation
+
+If you are using React Navigation to navigate across different screens, you can follow their guide on [Custom Android back button behaviour](https://reactnavigation.org/docs/custom-android-back-button-handling/)
+
+## Backhandler hook
+
+[React Native Hooks](https://github.com/react-native-community/hooks#usebackhandler) has a nice `useBackHandler` hook which will simplify the process of setting up event listeners.
+
+---
+
+# Reference
+
+## Methods
+
+### `addEventListener()`
+
+```tsx
+static addEventListener(
+ eventName: BackPressEventName,
+ handler: () => boolean | null | undefined,
+): NativeEventSubscription;
+```
+
+---
+
+### `exitApp()`
+
+```tsx
+static exitApp();
+```
diff --git a/website/versioned_docs/version-0.86/boxshadowvalue.md b/website/versioned_docs/version-0.86/boxshadowvalue.md
new file mode 100644
index 00000000000..d0cb09900f1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/boxshadowvalue.md
@@ -0,0 +1,73 @@
+---
+id: boxshadowvalue
+title: BoxShadowValue Object Type
+---
+
+The `BoxShadowValue` object is taken by the [`boxShadow`](./view-style-props.md#boxshadow) style prop. It is comprised of 2-4 lengths, an optional color, and an optional `inset` boolean. These values collectively define the box shadow's color, position, size, and blurriness.
+
+## Example
+
+```js
+{
+ offsetX: 10,
+ offsetY: -3,
+ blurRadius: '15px',
+ spreadDistance: '10px',
+ color: 'red',
+ inset: true,
+}
+```
+
+## Keys and values
+
+### `offsetX`
+
+The offset on the x-axis. This can be positive or negative. A positive value indicates right and negative indicates left.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | No |
+
+### `offsetY`
+
+The offset on the y-axis. This can be positive or negative. A positive value indicates up and negative indicates down.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | No |
+
+### `blurRadius`
+
+Represents the radius used in the [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur) algorithm. The larger the value the blurrier the shadow is. Only non-negative values are valid. The default is 0.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | Yes |
+
+### `spreadDistance`
+
+How much larger or smaller the shadow grows or shrinks. A positive value will grow the shadow, a negative value will shrink the shadow.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | Yes |
+
+### `color`
+
+The color of the shadow. The default is `black`.
+
+| Type | Optional |
+| -------------------- | -------- |
+| [color](./colors.md) | Yes |
+
+### `inset`
+
+Whether the shadow is inset or not. Inset shadows will appear around the inside of the element's border box as opposed to the outside.
+
+| Type | Optional |
+| ------- | -------- |
+| boolean | Yes |
+
+## Used by
+
+- [`boxShadow`](./view-style-props.md#boxshadow)
diff --git a/website/versioned_docs/version-0.86/build-speed.md b/website/versioned_docs/version-0.86/build-speed.md
new file mode 100644
index 00000000000..0db1929f4f3
--- /dev/null
+++ b/website/versioned_docs/version-0.86/build-speed.md
@@ -0,0 +1,184 @@
+---
+id: build-speed
+title: Speeding up your Build phase
+---
+
+Building your React Native app could be **expensive** and take several minutes of developers time.
+This can be problematic as your project grows and generally in bigger organizations with multiple React Native developers.
+
+To mitigate this performance hit, this page shares some suggestions on how to **improve your build time**.
+
+:::info
+
+Please note that those suggestions are advanced feature that requires some amount of understanding of how the native build tools work.
+
+:::
+
+## Build only one ABI during development (Android-only)
+
+When building your android app locally, by default you build all the 4 [Application Binary Interfaces (ABIs)](https://developer.android.com/ndk/guides/abis) : `armeabi-v7a`, `arm64-v8a`, `x86` & `x86_64`.
+
+However, you probably don't need to build all of them if you're building locally and testing your emulator or on a physical device.
+
+This should reduce your **native build time** by a ~75% factor.
+
+If you're using the React Native CLI, you can add the `--active-arch-only` flag to the `run-android` command. This flag will make sure the correct ABI is picked up from either the running emulator or the plugged in phone. To confirm that this approach is working fine, you'll see a message like `info Detected architectures arm64-v8a` on console.
+
+```
+$ yarn react-native run-android --active-arch-only
+
+[ ... ]
+info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
+Jetifier found 1037 file(s) to forward-jetify. Using 32 workers...
+info JS server already running.
+info Detected architectures arm64-v8a
+info Installing the app...
+```
+
+This mechanism relies on the `reactNativeArchitectures` Gradle property.
+
+Therefore, if you're building directly with Gradle from the command line and without the CLI, you can specify the ABI you want to build as follows:
+
+```
+$ ./gradlew :app:assembleDebug -PreactNativeArchitectures=x86,x86_64
+```
+
+This can be useful if you wish to build your Android App on a CI and use a matrix to parallelize the build of the different architectures.
+
+If you wish, you can also override this value locally, using the `gradle.properties` file you have in the [top-level folder](https://github.com/facebook/react-native/blob/19cf70266eb8ca151aa0cc46ac4c09cb987b2ceb/template/android/gradle.properties#L30-L33) of your project:
+
+```
+# Use this property to specify which architecture you want to build.
+# You can also override it from the CLI using
+# ./gradlew -PreactNativeArchitectures=x86_64
+reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
+```
+
+Once you build a **release version** of your app, don't forget to remove those flags as you want to build an apk/app bundle that works for all the ABIs and not only for the one you're using in your daily development workflow.
+
+## Enable Configuration Caching (Android-only)
+
+Since React Native 0.79, you can also enable Gradle Configuration Caching.
+
+When you’re running an Android build with `yarn android`, you will be executing a Gradle build that is composed by two steps ([source](https://docs.gradle.org/current/userguide/build_lifecycle.html)):
+
+- Configuration phase, when all the `.gradle` files are evaluated.
+- Execution phase, when the tasks are actually executed so the Java/Kotlin code is compiled and so on.
+
+You will now be able to enable Configuration Caching, which will allow you to skip the Configuration phase on subsequent builds.
+
+This is beneficial when making frequent changes to the native code as it improves build times.
+
+For example here you can see how rebuilding faster it is to rebuild RN-Tester after a change in the native code:
+
+
+
+You can enable Gradle Configuration Caching by adding the following line in your `android/gradle.properties` file:
+
+```
+org.gradle.configuration-cache=true
+```
+
+Please refer to the [official Gradle documentation](https://docs.gradle.org/current/userguide/configuration_cache.html) for more resources on Configuration Caching.
+
+## Using a Maven Mirror (Android-only)
+
+When building Android apps, your Gradle builds will need to download the necessary dependencies from Maven Central and other repositories from the internet.
+
+If your organization is running a Maven repository mirror, you should consider using it as it will speed up your build, by downloading the artifacts from the mirror rather than from the internet.
+
+You can configure a mirror by specifying the `exclusiveEnterpriseRepository` property in your `android/gradle.properties` file:
+
+```diff
+# Use this property to enable or disable the Hermes JS engine.
+# If set to false, you will be using JSC instead.
+hermesEnabled=true
+
+# Use this property to configure a Maven enterprise repository
+# that will be used exclusively to fetch all of your dependencies.
++exclusiveEnterpriseRepository=https://my.internal.proxy.net/
+```
+
+By setting this property, your build will fetch dependencies **exclusively** from your specified repository and not from others.
+
+## Use a compiler cache
+
+If you're running frequent native builds (either C++ or Objective-C), you might benefit from using a **compiler cache**.
+
+Specifically you can use two type of caches: local compiler caches and distributed compiler caches.
+
+### Local caches
+
+:::info
+The following instructions will work for **both Android & iOS**.
+If you're building only Android apps, you should be good to go.
+If you're building also iOS apps, please follow the instructions in the [Xcode Specific Setup](#xcode-specific-setup) section below.
+:::
+
+We suggest to use [**ccache**](https://ccache.dev/) to cache the compilation of your native builds.
+Ccache works by wrapping the C++ compilers, storing the compilation results, and skipping the compilation
+if an intermediate compilation result was originally stored.
+
+Ccache is available in the package manager for most operating systems. On macOS, we can install ccache with `brew install ccache`.
+Or you can follow the [official installation instructions](https://github.com/ccache/ccache/blob/master/doc/install.md) to install from source.
+
+You can then do two clean builds (e.g. on Android you can first run `yarn react-native run-android`, delete the `android/app/build` folder and run the first command once more). You will notice that the second build was way faster than the first one (it should take seconds rather than minutes).
+While building, you can verify that `ccache` works correctly and check the cache hits/miss rate `ccache -s`
+
+```
+$ ccache -s
+Summary:
+ Hits: 196 / 3068 (6.39 %)
+ Direct: 0 / 3068 (0.00 %)
+ Preprocessed: 196 / 3068 (6.39 %)
+ Misses: 2872
+ Direct: 3068
+ Preprocessed: 2872
+ Uncacheable: 1
+Primary storage:
+ Hits: 196 / 6136 (3.19 %)
+ Misses: 5940
+ Cache size (GB): 0.60 / 20.00 (3.00 %)
+```
+
+Note that `ccache` aggregates the stats over all builds. You can use `ccache --zero-stats` to reset them before a build to verify the cache-hit ratio.
+
+Should you need to wipe your cache, you can do so with `ccache --clear`
+
+#### Xcode Specific Setup
+
+To make sure `ccache` works correctly with iOS and Xcode, you need to enable React Native support for ccache in `ios/Podfile`.
+
+Open `ios/Podfile` in your editor and uncomment the `ccache_enabled` line.
+
+```ruby
+ post_install do |installer|
+ # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
+ react_native_post_install(
+ installer,
+ config[:reactNativePath],
+ :mac_catalyst_enabled => false,
+ # TODO: Uncomment the line below
+ :ccache_enabled => true
+ )
+ end
+```
+
+#### Using this approach on a CI
+
+Ccache uses the `/Users/$USER/Library/Caches/ccache` folder on macOS to store the cache.
+Therefore you could save & restore the corresponding folder also on CI to speedup your builds.
+
+However, there are a couple of things to be aware:
+
+1. On CI, we recommend to do a full clean build, to avoid poisoned cache problems. If you follow the approach mentioned in the previous paragraph, you should be able to parallelize the native build on 4 different ABIs and you will most likely not need `ccache` on CI.
+
+2. `ccache` relies on timestamps to compute a cache hit. This doesn't work well on CI as files are re-downloaded at every CI run. To overcome this, you'll need to use the `compiler_check content` option which relies instead on [hashing the content of the file](https://ccache.dev/manual/4.3.html).
+
+### Distributed caches
+
+Similar to local caches, you might want to consider using a distributed cache for your native builds.
+This could be specifically useful in bigger organizations that are doing frequent native builds.
+
+We recommend to use [sccache](https://github.com/mozilla/sccache) to achieve this.
+We defer to the sccache [distributed compilation quickstart](https://github.com/mozilla/sccache/blob/main/docs/DistributedQuickstart.md) for instructions on how to setup and use this tool.
diff --git a/website/versioned_docs/version-0.86/building-for-tv.md b/website/versioned_docs/version-0.86/building-for-tv.md
new file mode 100644
index 00000000000..b39f843a481
--- /dev/null
+++ b/website/versioned_docs/version-0.86/building-for-tv.md
@@ -0,0 +1,11 @@
+---
+id: building-for-tv
+title: 🗑️ Building For TV Devices
+hide_table_of_contents: true
+---
+
+TV devices support has been implemented with the intention of making existing React Native applications work on Apple TV and Android TV, with few or no changes needed in the JavaScript code for the applications.
+
+:::warning Deprecated
+TV support has moved to the [React Native for TV](https://github.com/react-native-tvos/react-native-tvos#readme) repository. Please see the **README** there for information on projects for Apple TV or Android TV.
+:::
diff --git a/website/versioned_docs/version-0.86/button.md b/website/versioned_docs/version-0.86/button.md
new file mode 100644
index 00000000000..9fc529fc863
--- /dev/null
+++ b/website/versioned_docs/version-0.86/button.md
@@ -0,0 +1,299 @@
+---
+id: button
+title: Button
+---
+
+A basic button component that should render nicely on any platform. Supports a minimal level of customization.
+
+If this button doesn't look right for your app, you can build your own button using [Pressable](pressable). For inspiration, look at the [source code for the Button component](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/Button.js).
+
+```tsx
+
+```
+
+## Example
+
+```SnackPlayer name=Button%20Example&ext=js
+import React from 'react';
+import {StyleSheet, Button, View, Text, Alert, Platform} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const Separator = () => ;
+
+function showAlert(message) {
+ if (Platform.OS === 'web') {
+ window.alert(message);
+ } else {
+ Alert.alert(message);
+ }
+}
+
+const App = () => (
+
+
+
+
+ The title and onPress handler are required. It is recommended to set
+ accessibilityLabel to help make your app usable by everyone.
+
+
+
+
+
+ Adjust the color in a way that looks standard on each platform. On
+ iOS, the color prop controls the color of the text. On Android, the
+ color adjusts the background color of the button.
+
+
+
+
+
+ All interaction for the component are disabled.
+
+
+
+
+
+ This layout strategy lets the title define the width of the button.
+
+
+
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ marginHorizontal: 16,
+ },
+ title: {
+ textAlign: 'center',
+ marginVertical: 8,
+ },
+ fixToText: {
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ },
+ separator: {
+ marginVertical: 8,
+ borderBottomColor: '#737373',
+ borderBottomWidth: StyleSheet.hairlineWidth,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Props
+
+###
Required
**`onPress`**
+
+Handler to be called when the user taps the button.
+
+| Type |
+| ---------------------------------------------- |
+| `md ({nativeEvent: [PressEvent](pressevent)})` |
+
+---
+
+###
Required
**`title`**
+
+Text to display inside the button. On Android the given title will be converted to the uppercased form.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `accessibilityLabel`
+
+Text to display for blindness accessibility features.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `accessibilityLanguage`
iOS
+
+A value indicating which language should be used by the screen reader when the user interacts with the element. It should follow the [BCP 47 specification](https://www.rfc-editor.org/info/bcp47).
+
+See the [iOS `accessibilityLanguage` doc](https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage) for more information.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `accessibilityActions`
+
+Accessibility actions allow an assistive technology to programmatically invoke the actions of a component. The `accessibilityActions` property should contain a list of action objects. Each action object should contain the field name and label.
+
+See the [Accessibility guide](accessibility.md#accessibility-actions) for more information.
+
+| Type | Required |
+| ----- | -------- |
+| array | No |
+
+---
+
+### `onAccessibilityAction`
+
+Invoked when the user performs the accessibility actions. The only argument to this function is an event containing the name of the action to perform.
+
+See the [Accessibility guide](accessibility.md#accessibility-actions) for more information.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `color`
+
+Color of the text (iOS), or background color of the button (Android).
+
+```mdx-code-block
+export function ColorDefaults() {
+ return (
+ <>
+ {" "}'#2196F3'
+ {" "}
+
+Designates the next view to receive focus when the user navigates down. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusDown).
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `nextFocusForward`
Android
TV
+
+Designates the next view to receive focus when the user navigates forward. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusForward).
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `nextFocusLeft`
Android
TV
+
+Designates the next view to receive focus when the user navigates left. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusLeft).
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `nextFocusRight`
Android
TV
+
+Designates the next view to receive focus when the user navigates right. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusRight).
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `nextFocusUp`
Android
TV
+
+Designates the next view to receive focus when the user navigates up. See the [Android documentation](https://developer.android.com/reference/android/view/View.html#attr_android:nextFocusUp).
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `touchSoundDisabled`
Android
+
+If `true`, doesn't play system sound on touch.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
diff --git a/website/versioned_docs/version-0.86/checkbox.md b/website/versioned_docs/version-0.86/checkbox.md
new file mode 100644
index 00000000000..e92591defd5
--- /dev/null
+++ b/website/versioned_docs/version-0.86/checkbox.md
@@ -0,0 +1,8 @@
+---
+id: checkbox
+title: '❌ CheckBox'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=checkbox) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/clipboard.md b/website/versioned_docs/version-0.86/clipboard.md
new file mode 100644
index 00000000000..bcfbf8714d9
--- /dev/null
+++ b/website/versioned_docs/version-0.86/clipboard.md
@@ -0,0 +1,8 @@
+---
+id: clipboard
+title: '❌ Clipboard'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=clipboard) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/colors.md b/website/versioned_docs/version-0.86/colors.md
new file mode 100644
index 00000000000..3c106ac6855
--- /dev/null
+++ b/website/versioned_docs/version-0.86/colors.md
@@ -0,0 +1,221 @@
+---
+id: colors
+title: Color Reference
+---
+
+Components in React Native are [styled using JavaScript](style). Color properties usually match how [CSS works on the web](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). General guides on the color usage on each platform could be found below:
+
+- [Android](https://material.io/design/color/color-usage.html)
+- [iOS](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/)
+
+## Color APIs
+
+React Native has several color APIs designed to allow you to take full advantage of your platform's design and user preferences.
+
+- [PlatformColor](platformcolor) lets you reference the platform's color system.
+- [DynamicColorIOS](dynamiccolorios) is iOS specific and allows you to specify which colors should be used in light or Dark Mode.
+
+## Color representations
+
+### Red Green Blue (RGB)
+
+React Native supports `rgb()` and `rgba()` in both hexadecimal and functional notation:
+
+- `'#f0f'` (#rgb)
+- `'#ff00ff'` (#rrggbb)
+- `'#f0ff'` (#rgba)
+- `'#ff00ff00'` (#rrggbbaa)
+- `'rgb(255, 0, 255)'`
+- `'rgb(255 0 255)'`
+- `'rgba(255, 0, 255, 1.0)'`
+- `'rgba(255 0 255 / 1.0)'`
+
+### Hue Saturation Lightness (HSL)
+
+React Native supports `hsl()` and `hsla()` in functional notation:
+
+- `'hsl(360, 100%, 100%)'`
+- `'hsl(360 100% 100%)'`
+- `'hsla(360, 100%, 100%, 1.0)'`
+- `'hsla(360 100% 100% / 1.0)'`
+
+### Hue Whiteness Blackness (HWB)
+
+React Native supports `hwb()` in functional notation:
+
+- `'hwb(0, 0%, 100%)'`
+- `'hwb(360, 100%, 100%)'`
+- `'hwb(0 0% 0%)'`
+- `'hwb(70 50% 0%)'`
+
+### Color ints
+
+React Native also supports colors as an `int` values (in RGB color mode):
+
+- `0xff00ff00` (0xrrggbbaa)
+
+:::caution
+This might appear similar to the Android [Color](https://developer.android.com/reference/android/graphics/Color) ints representation but on Android values are stored in SRGB color mode (0xaarrggbb).
+:::
+
+### Named colors
+
+In React Native you can also use color name strings as values.
+
+:::info
+React Native only supports lowercase color names. Uppercase color names are not supported.
+:::
+
+#### `transparent`
+
+This is a shortcut for `rgba(0,0,0,0)`, same like in [CSS3](https://www.w3.org/TR/css-color-3/#transparent).
+
+#### Color keywords
+
+Named colors implementation follows the [CSS3/SVG specification](https://www.w3.org/TR/css-color-3/#svg-color):
+
+- aliceblue (#f0f8ff)
+- antiquewhite (#faebd7)
+- aqua (#00ffff)
+- aquamarine (#7fffd4)
+- azure (#f0ffff)
+- beige (#f5f5dc)
+- bisque (#ffe4c4)
+- black (#000000)
+- blanchedalmond (#ffebcd)
+- blue (#0000ff)
+- blueviolet (#8a2be2)
+- brown (#a52a2a)
+- burlywood (#deb887)
+- cadetblue (#5f9ea0)
+- chartreuse (#7fff00)
+- chocolate (#d2691e)
+- coral (#ff7f50)
+- cornflowerblue (#6495ed)
+- cornsilk (#fff8dc)
+- crimson (#dc143c)
+- cyan (#00ffff)
+- darkblue (#00008b)
+- darkcyan (#008b8b)
+- darkgoldenrod (#b8860b)
+- darkgray (#a9a9a9)
+- darkgreen (#006400)
+- darkgrey (#a9a9a9)
+- darkkhaki (#bdb76b)
+- darkmagenta (#8b008b)
+- darkolivegreen (#556b2f)
+- darkorange (#ff8c00)
+- darkorchid (#9932cc)
+- darkred (#8b0000)
+- darksalmon (#e9967a)
+- darkseagreen (#8fbc8f)
+- darkslateblue (#483d8b)
+- darkslategrey (#2f4f4f)
+- darkturquoise (#00ced1)
+- darkviolet (#9400d3)
+- deeppink (#ff1493)
+- deepskyblue (#00bfff)
+- dimgray (#696969)
+- dimgrey (#696969)
+- dodgerblue (#1e90ff)
+- firebrick (#b22222)
+- floralwhite (#fffaf0)
+- forestgreen (#228b22)
+- fuchsia (#ff00ff)
+- gainsboro (#dcdcdc)
+- ghostwhite (#f8f8ff)
+- gold (#ffd700)
+- goldenrod (#daa520)
+- gray (#808080)
+- green (#008000)
+- greenyellow (#adff2f)
+- grey (#808080)
+- honeydew (#f0fff0)
+- hotpink (#ff69b4)
+- indianred (#cd5c5c)
+- indigo (#4b0082)
+- ivory (#fffff0)
+- khaki (#f0e68c)
+- lavender (#e6e6fa)
+- lavenderblush (#fff0f5)
+- lawngreen (#7cfc00)
+- lemonchiffon (#fffacd)
+- lightblue (#add8e6)
+- lightcoral (#f08080)
+- lightcyan (#e0ffff)
+- lightgoldenrodyellow (#fafad2)
+- lightgray (#d3d3d3)
+- lightgreen (#90ee90)
+- lightgrey (#d3d3d3)
+- lightpink (#ffb6c1)
+- lightsalmon (#ffa07a)
+- lightseagreen (#20b2aa)
+- lightskyblue (#87cefa)
+- lightslategrey (#778899)
+- lightsteelblue (#b0c4de)
+- lightyellow (#ffffe0)
+- lime (#00ff00)
+- limegreen (#32cd32)
+- linen (#faf0e6)
+- magenta (#ff00ff)
+- maroon (#800000)
+- mediumaquamarine (#66cdaa)
+- mediumblue (#0000cd)
+- mediumorchid (#ba55d3)
+- mediumpurple (#9370db)
+- mediumseagreen (#3cb371)
+- mediumslateblue (#7b68ee)
+- mediumspringgreen (#00fa9a)
+- mediumturquoise (#48d1cc)
+- mediumvioletred (#c71585)
+- midnightblue (#191970)
+- mintcream (#f5fffa)
+- mistyrose (#ffe4e1)
+- moccasin (#ffe4b5)
+- navajowhite (#ffdead)
+- navy (#000080)
+- oldlace (#fdf5e6)
+- olive (#808000)
+- olivedrab (#6b8e23)
+- orange (#ffa500)
+- orangered (#ff4500)
+- orchid (#da70d6)
+- palegoldenrod (#eee8aa)
+- palegreen (#98fb98)
+- paleturquoise (#afeeee)
+- palevioletred (#db7093)
+- papayawhip (#ffefd5)
+- peachpuff (#ffdab9)
+- peru (#cd853f)
+- pink (#ffc0cb)
+- plum (#dda0dd)
+- powderblue (#b0e0e6)
+- purple (#800080)
+- rebeccapurple (#663399)
+- red (#ff0000)
+- rosybrown (#bc8f8f)
+- royalblue (#4169e1)
+- saddlebrown (#8b4513)
+- salmon (#fa8072)
+- sandybrown (#f4a460)
+- seagreen (#2e8b57)
+- seashell (#fff5ee)
+- sienna (#a0522d)
+- silver (#c0c0c0)
+- skyblue (#87ceeb)
+- slateblue (#6a5acd)
+- slategray (#708090)
+- snow (#fffafa)
+- springgreen (#00ff7f)
+- steelblue (#4682b4)
+- tan (#d2b48c)
+- teal (#008080)
+- thistle (#d8bfd8)
+- tomato (#ff6347)
+- turquoise (#40e0d0)
+- violet (#ee82ee)
+- wheat (#f5deb3)
+- white (#ffffff)
+- whitesmoke (#f5f5f5)
+- yellow (#ffff00)
+- yellowgreen (#9acd32)
diff --git a/website/versioned_docs/version-0.86/communication-android.md b/website/versioned_docs/version-0.86/communication-android.md
new file mode 100644
index 00000000000..f78dc84cf65
--- /dev/null
+++ b/website/versioned_docs/version-0.86/communication-android.md
@@ -0,0 +1,153 @@
+---
+id: communication-android
+title: Communication between native and React Native
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+In [Integrating with Existing Apps guide](integration-with-existing-apps) and [Native UI Components guide](legacy/native-components-android) we learn how to embed React Native in a native component and vice versa. When we mix native and React Native components, we'll eventually find a need to communicate between these two worlds. Some ways to achieve that have been already mentioned in other guides. This article summarizes available techniques.
+
+## Introduction
+
+React Native is inspired by React, so the basic idea of the information flow is similar. The flow in React is one-directional. We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this with properties: data is passed from a parent to its children in a top-down manner. If an ancestor component relies on the state of its descendant, one should pass down a callback to be used by the descendant to update the ancestor.
+
+The same concept applies to React Native. As long as we are building our application purely within the framework, we can drive our app with properties and callbacks. But, when we mix React Native and native components, we need some specific, cross-language mechanisms that would allow us to pass information between them.
+
+## Properties
+
+Properties are the most straightforward way of cross-component communication. So we need a way to pass properties both from native to React Native, and from React Native to native.
+
+### Passing properties from native to React Native
+
+You can pass properties down to the React Native app by providing a custom implementation of `ReactActivityDelegate` in your main activity. This implementation should override `getLaunchOptions` to return a `Bundle` with the desired properties.
+
+
+
+
+
+```java
+public class MainActivity extends ReactActivity {
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate() {
+ return new ReactActivityDelegate(this, getMainComponentName()) {
+ @Override
+ protected Bundle getLaunchOptions() {
+ Bundle initialProperties = new Bundle();
+ ArrayList imageList = new ArrayList(Arrays.asList(
+ "https://dummyimage.com/600x400/ffffff/000000.png",
+ "https://dummyimage.com/600x400/000000/ffffff.png"
+ ));
+ initialProperties.putStringArrayList("images", imageList);
+ return initialProperties;
+ }
+ };
+ }
+}
+```
+
+
+
+
+
+```kotlin
+class MainActivity : ReactActivity() {
+ override fun createReactActivityDelegate(): ReactActivityDelegate {
+ return object : ReactActivityDelegate(this, mainComponentName) {
+ override fun getLaunchOptions(): Bundle {
+ val imageList = arrayListOf("https://dummyimage.com/600x400/ffffff/000000.png", "https://dummyimage.com/600x400/000000/ffffff.png")
+ val initialProperties = Bundle().apply { putStringArrayList("images", imageList) }
+ return initialProperties
+ }
+ }
+ }
+}
+```
+
+
+
+
+```tsx
+import React from 'react';
+import {View, Image} from 'react-native';
+
+export default class ImageBrowserApp extends React.Component {
+ renderImage(imgURI) {
+ return ;
+ }
+ render() {
+ return {this.props.images.map(this.renderImage)};
+ }
+}
+```
+
+`ReactRootView` provides a read-write property `appProperties`. After `appProperties` is set, the React Native app is re-rendered with new properties. The update is only performed when the new updated properties differ from the previous ones.
+
+
+
+
+
+```java
+Bundle updatedProps = mReactRootView.getAppProperties();
+ArrayList imageList = new ArrayList(Arrays.asList(
+ "https://dummyimage.com/600x400/ff0000/000000.png",
+ "https://dummyimage.com/600x400/ffffff/ff0000.png"
+));
+updatedProps.putStringArrayList("images", imageList);
+
+mReactRootView.setAppProperties(updatedProps);
+```
+
+
+
+
+
+```kotlin
+var updatedProps: Bundle = reactRootView.getAppProperties()
+var imageList = arrayListOf("https://dummyimage.com/600x400/ff0000/000000.png", "https://dummyimage.com/600x400/ffffff/ff0000.png")
+```
+
+
+
+
+
+It is fine to update properties anytime. However, updates have to be performed on the main thread. You use the getter on any thread.
+
+There is no way to update only a few properties at a time. We suggest that you build it into your own wrapper instead.
+
+:::info
+Currently, JS function `componentWillUpdateProps` of the top level RN component will not be called after a prop update. However, you can access the new props in `componentDidMount` function.
+:::
+
+### Passing properties from React Native to native
+
+The problem exposing properties of native components is covered in detail in [this article](legacy/native-components-android#3-expose-view-property-setters-using-reactprop-or-reactpropgroup-annotation). In short, properties that are to be reflected in JavaScript needs to be exposed as setter method annotated with `@ReactProp`, then use them in React Native as if the component was an ordinary React Native component.
+
+### Limits of properties
+
+The main drawback of cross-language properties is that they do not support callbacks, which would allow us to handle bottom-up data bindings. Imagine you have a small RN view that you want to be removed from the native parent view as a result of a JS action. There is no way to do that with props, as the information would need to go bottom-up.
+
+Although we have a flavor of cross-language callbacks ([described here](legacy/native-modules-android#callbacks)), these callbacks are not always the thing we need. The main problem is that they are not intended to be passed as properties. Rather, this mechanism allows us to trigger a native action from JS, and handle the result of that action in JS.
+
+## Other ways of cross-language interaction (events and native modules)
+
+As stated in the previous chapter, using properties comes with some limitations. Sometimes properties are not enough to drive the logic of our app and we need a solution that gives more flexibility. This chapter covers other communication techniques available in React Native. They can be used for internal communication (between JS and native layers in RN) as well as for external communication (between RN and the 'pure native' part of your app).
+
+React Native enables you to perform cross-language function calls. You can execute custom native code from JS and vice versa. Unfortunately, depending on the side we are working on, we achieve the same goal in different ways. For native - we use events mechanism to schedule an execution of a handler function in JS, while for React Native we directly call methods exported by native modules.
+
+### Calling React Native functions from native (events)
+
+Events are described in detail in [this article](legacy/native-components-android#events). Note that using events gives us no guarantees about execution time, as the event is handled on a separate thread.
+
+Events are powerful, because they allow us to change React Native components without needing a reference to them. However, there are some pitfalls that you can fall into while using them:
+
+- As events can be sent from anywhere, they can introduce spaghetti-style dependencies into your project.
+- Events share namespace, which means that you may encounter some name collisions. Collisions will not be detected statically, which makes them hard to debug.
+- If you use several instances of the same React Native component and you want to distinguish them from the perspective of your event, you'll likely need to introduce identifiers and pass them along with events (you can use the native view's `reactTag` as an identifier).
+
+### Calling native functions from React Native (native modules)
+
+Native modules are Java/Kotlin classes that are available in JS. Typically one instance of each module is created per JS bridge. They can export arbitrary functions and constants to React Native. They have been covered in detail in [this article](legacy/native-modules-android).
+
+:::warning
+All native modules share the same namespace. Watch out for name collisions when creating new ones.
+:::
diff --git a/website/versioned_docs/version-0.86/communication-ios.md b/website/versioned_docs/version-0.86/communication-ios.md
new file mode 100644
index 00000000000..f82cae7e620
--- /dev/null
+++ b/website/versioned_docs/version-0.86/communication-ios.md
@@ -0,0 +1,204 @@
+---
+id: communication-ios
+title: Communication between native and React Native
+---
+
+In [Integrating with Existing Apps guide](integration-with-existing-apps) and [Native UI Components guide](legacy/native-components-ios) we learn how to embed React Native in a native component and vice versa. When we mix native and React Native components, we'll eventually find a need to communicate between these two worlds. Some ways to achieve that have been already mentioned in other guides. This article summarizes available techniques.
+
+## Introduction
+
+React Native is inspired by React, so the basic idea of the information flow is similar. The flow in React is one-directional. We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this with properties: data is passed from a parent to its children in a top-down manner. If an ancestor component relies on the state of its descendant, one should pass down a callback to be used by the descendant to update the ancestor.
+
+The same concept applies to React Native. As long as we are building our application purely within the framework, we can drive our app with properties and callbacks. But, when we mix React Native and native components, we need some specific, cross-language mechanisms that would allow us to pass information between them.
+
+## Properties
+
+Properties are the most straightforward way of cross-component communication. So we need a way to pass properties both from native to React Native, and from React Native to native.
+
+### Passing properties from native to React Native
+
+In order to embed a React Native view in a native component, we use `RCTRootView`. `RCTRootView` is a `UIView` that holds a React Native app. It also provides an interface between native side and the hosted app.
+
+`RCTRootView` has an initializer that allows you to pass arbitrary properties down to the React Native app. The `initialProperties` parameter has to be an instance of `NSDictionary`. The dictionary is internally converted into a JSON object that the top-level JS component can reference.
+
+```objectivec
+NSArray *imageList = @[@"https://dummyimage.com/600x400/ffffff/000000.png",
+ @"https://dummyimage.com/600x400/000000/ffffff.png"];
+
+NSDictionary *props = @{@"images" : imageList};
+
+RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:@"ImageBrowserApp"
+ initialProperties:props];
+```
+
+```tsx
+import React from 'react';
+import {View, Image} from 'react-native';
+
+export default class ImageBrowserApp extends React.Component {
+ renderImage(imgURI) {
+ return ;
+ }
+ render() {
+ return {this.props.images.map(this.renderImage)};
+ }
+}
+```
+
+`RCTRootView` also provides a read-write property `appProperties`. After `appProperties` is set, the React Native app is re-rendered with new properties. The update is only performed when the new updated properties differ from the previous ones.
+
+```objectivec
+NSArray *imageList = @[@"https://dummyimage.com/600x400/ff0000/000000.png",
+ @"https://dummyimage.com/600x400/ffffff/ff0000.png"];
+
+rootView.appProperties = @{@"images" : imageList};
+```
+
+It is fine to update properties anytime. However, updates have to be performed on the main thread. You use the getter on any thread.
+
+:::note
+Currently, there is a known issue where setting appProperties during the bridge startup, the change can be lost. See https://github.com/facebook/react-native/issues/20115 for more information.
+:::
+
+There is no way to update only a few properties at a time. We suggest that you build it into your own wrapper instead.
+
+### Passing properties from React Native to native
+
+The problem exposing properties of native components is covered in detail in [this article](legacy/native-components-ios#properties). In short, export properties with `RCT_CUSTOM_VIEW_PROPERTY` macro in your custom native component, then use them in React Native as if the component was an ordinary React Native component.
+
+### Limits of properties
+
+The main drawback of cross-language properties is that they do not support callbacks, which would allow us to handle bottom-up data bindings. Imagine you have a small RN view that you want to be removed from the native parent view as a result of a JS action. There is no way to do that with props, as the information would need to go bottom-up.
+
+Although we have a flavor of cross-language callbacks ([described here](legacy/native-modules-ios#callbacks)), these callbacks are not always the thing we need. The main problem is that they are not intended to be passed as properties. Rather, this mechanism allows us to trigger a native action from JS, and handle the result of that action in JS.
+
+## Other ways of cross-language interaction (events and native modules)
+
+As stated in the previous chapter, using properties comes with some limitations. Sometimes properties are not enough to drive the logic of our app and we need a solution that gives more flexibility. This chapter covers other communication techniques available in React Native. They can be used for internal communication (between JS and native layers in RN) as well as for external communication (between RN and the 'pure native' part of your app).
+
+React Native enables you to perform cross-language function calls. You can execute custom native code from JS and vice versa. Unfortunately, depending on the side we are working on, we achieve the same goal in different ways. For native - we use events mechanism to schedule an execution of a handler function in JS, while for React Native we directly call methods exported by native modules.
+
+### Calling React Native functions from native (events)
+
+Events are described in detail in [this article](legacy/native-components-ios#events). Note that using events gives us no guarantees about execution time, as the event is handled on a separate thread.
+
+Events are powerful, because they allow us to change React Native components without needing a reference to them. However, there are some pitfalls that you can fall into while using them:
+
+- As events can be sent from anywhere, they can introduce spaghetti-style dependencies into your project.
+- Events share namespace, which means that you may encounter some name collisions. Collisions will not be detected statically, which makes them hard to debug.
+- If you use several instances of the same React Native component and you want to distinguish them from the perspective of your event, you'll likely need to introduce identifiers and pass them along with events (you can use the native view's `reactTag` as an identifier).
+
+The common pattern we use when embedding native in React Native is to make the native component's RCTViewManager a delegate for the views, sending events back to JavaScript via the bridge. This keeps related event calls in one place.
+
+### Calling native functions from React Native (native modules)
+
+Native modules are Objective-C classes that are available in JS. Typically one instance of each module is created per JS bridge. They can export arbitrary functions and constants to React Native. They have been covered in detail in [this article](legacy/native-modules-ios#content).
+
+The fact that native modules are singletons limits the mechanism in the context of embedding. Let's say we have a React Native component embedded in a native view and we want to update the native, parent view. Using the native module mechanism, we would export a function that not only takes expected arguments, but also an identifier of the parent native view. The identifier would be used to retrieve a reference to the parent view to update. That said, we would need to keep a mapping from identifiers to native views in the module.
+
+Although this solution is complex, it is used in `RCTUIManager`, which is an internal React Native class that manages all React Native views.
+
+Native modules can also be used to expose existing native libraries to JS. The [Geolocation library](https://github.com/michalchudziak/react-native-geolocation) is a living example of the idea.
+
+:::caution
+All native modules share the same namespace. Watch out for name collisions when creating new ones.
+:::
+
+## Layout computation flow
+
+When integrating native and React Native, we also need a way to consolidate two different layout systems. This section covers common layout problems and provides a brief description of mechanisms to address them.
+
+### Layout of a native component embedded in React Native
+
+This case is covered in [this article](legacy/native-components-ios#styles). To summarize, since all our native react views are subclasses of `UIView`, most style and size attributes will work like you would expect out of the box.
+
+### Layout of a React Native component embedded in native
+
+#### React Native content with fixed size
+
+The general scenario is when we have a React Native app with a fixed size, which is known to the native side. In particular, a full-screen React Native view falls into this case. If we want a smaller root view, we can explicitly set RCTRootView's frame.
+
+For instance, to make an RN app 200 (logical) pixels high, and the hosting view's width wide, we could do:
+
+```objectivec title='SomeViewController.m'
+- (void)viewDidLoad
+{
+ [...]
+ RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:appName
+ initialProperties:props];
+ rootView.frame = CGRectMake(0, 0, self.view.width, 200);
+ [self.view addSubview:rootView];
+}
+```
+
+When we have a fixed size root view, we need to respect its bounds on the JS side. In other words, we need to ensure that the React Native content can be contained within the fixed-size root view. The easiest way to ensure this is to use Flexbox layout. If you use absolute positioning, and React components are visible outside the root view's bounds, you'll get overlap with native views, causing some features to behave unexpectedly. For instance, 'TouchableHighlight' will not highlight your touches outside the root view's bounds.
+
+It's totally fine to update root view's size dynamically by re-setting its frame property. React Native will take care of the content's layout.
+
+#### React Native content with flexible size
+
+In some cases we'd like to render content of initially unknown size. Let's say the size will be defined dynamically in JS. We have two solutions to this problem.
+
+1. You can wrap your React Native view in a `ScrollView` component. This guarantees that your content will always be available and it won't overlap with native views.
+2. React Native allows you to determine, in JS, the size of the RN app and provide it to the owner of the hosting `RCTRootView`. The owner is then responsible for re-laying out the subviews and keeping the UI consistent. We achieve this with `RCTRootView`'s flexibility modes.
+
+`RCTRootView` supports 4 different size flexibility modes:
+
+```objectivec title='RCTRootView.h'
+typedef NS_ENUM(NSInteger, RCTRootViewSizeFlexibility) {
+ RCTRootViewSizeFlexibilityNone = 0,
+ RCTRootViewSizeFlexibilityWidth,
+ RCTRootViewSizeFlexibilityHeight,
+ RCTRootViewSizeFlexibilityWidthAndHeight,
+};
+```
+
+`RCTRootViewSizeFlexibilityNone` is the default value, which makes a root view's size fixed (but it still can be updated with `setFrame:`). The other three modes allow us to track React Native content's size updates. For instance, setting mode to `RCTRootViewSizeFlexibilityHeight` will cause React Native to measure the content's height and pass that information back to `RCTRootView`'s delegate. An arbitrary action can be performed within the delegate, including setting the root view's frame, so the content fits. The delegate is called only when the size of the content has changed.
+
+:::caution
+Making a dimension flexible in both JS and native leads to undefined behavior. For example - don't make a top-level React component's width flexible (with `flexbox`) while you're using `RCTRootViewSizeFlexibilityWidth` on the hosting `RCTRootView`.
+:::
+
+Let's look at an example.
+
+```objectivec title='FlexibleSizeExampleView.m'
+- (instancetype)initWithFrame:(CGRect)frame
+{
+ [...]
+
+ _rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:@"FlexibilityExampleApp"
+ initialProperties:@{}];
+
+ _rootView.delegate = self;
+ _rootView.sizeFlexibility = RCTRootViewSizeFlexibilityHeight;
+ _rootView.frame = CGRectMake(0, 0, self.frame.size.width, 0);
+}
+
+#pragma mark - RCTRootViewDelegate
+- (void)rootViewDidChangeIntrinsicSize:(RCTRootView *)rootView
+{
+ CGRect newFrame = rootView.frame;
+ newFrame.size = rootView.intrinsicContentSize;
+
+ rootView.frame = newFrame;
+}
+```
+
+In the example we have a `FlexibleSizeExampleView` view that holds a root view. We create the root view, initialize it and set the delegate. The delegate will handle size updates. Then, we set the root view's size flexibility to `RCTRootViewSizeFlexibilityHeight`, which means that `rootViewDidChangeIntrinsicSize:` method will be called every time the React Native content changes its height. Finally, we set the root view's width and position. Note that we set there height as well, but it has no effect as we made the height RN-dependent.
+
+You can checkout full source code of the example [here](https://github.com/facebook/react-native/blob/main/packages/rn-tester/RNTester/NativeExampleViews/FlexibleSizeExampleView.mm).
+
+It's fine to change root view's size flexibility mode dynamically. Changing flexibility mode of a root view will schedule a layout recalculation and the delegate `rootViewDidChangeIntrinsicSize:` method will be called once the content size is known.
+
+:::note
+React Native layout calculation is performed on a separate thread, while native UI view updates are done on the main thread.
+This may cause temporary UI inconsistencies between native and React Native. This is a known problem and our team is working on synchronizing UI updates coming from different sources.
+:::
+
+:::note
+React Native does not perform any layout calculations until the root view becomes a subview of some other views.
+If you want to hide React Native view until its dimensions are known, add the root view as a subview and make it initially hidden (use `UIView`'s `hidden` property). Then change its visibility in the delegate method.
+:::
diff --git a/website/versioned_docs/version-0.86/components-and-apis.md b/website/versioned_docs/version-0.86/components-and-apis.md
new file mode 100644
index 00000000000..616ead503e0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/components-and-apis.md
@@ -0,0 +1,213 @@
+---
+id: components-and-apis
+title: Core Components and APIs
+---
+
+React Native provides a number of built-in [Core Components](intro-react-native-components) ready for you to use in your app. You can find them all in the left sidebar (or menu above, if you are on a narrow screen). If you're not sure where to get started, take a look at the following categories:
+
+- [Basic Components](components-and-apis#basic-components)
+- [User Interface](components-and-apis#user-interface)
+- [List Views](components-and-apis#list-views)
+- [Android-specific](components-and-apis#android-components-and-apis)
+- [iOS-specific](components-and-apis#ios-components-and-apis)
+- [Others](components-and-apis#others)
+
+You're not limited to the components and APIs bundled with React Native. React Native has a community of thousands of developers. If you're looking for a library that does something specific, please refer to [this guide about finding libraries](libraries#finding-libraries).
+
+## Basic Components
+
+Most apps will end up using one or more of these basic components.
+
+
+
+## List Views
+
+Unlike the more generic [`ScrollView`](./scrollview), the following list view components only render elements that are currently showing on the screen. This makes them a performant choice for displaying long lists of data.
+
+
+
+## Others
+
+These components may be useful for certain applications. For an exhaustive list of components and APIs, check out the sidebar to the left (or menu above, if you are on a narrow screen).
+
+
diff --git a/website/versioned_docs/version-0.86/datepickerandroid.md b/website/versioned_docs/version-0.86/datepickerandroid.md
new file mode 100644
index 00000000000..c928fdffee6
--- /dev/null
+++ b/website/versioned_docs/version-0.86/datepickerandroid.md
@@ -0,0 +1,8 @@
+---
+id: datepickerandroid
+title: '❌ DatePickerAndroid'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=datepicker) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/datepickerios.md b/website/versioned_docs/version-0.86/datepickerios.md
new file mode 100644
index 00000000000..7965ec05c3a
--- /dev/null
+++ b/website/versioned_docs/version-0.86/datepickerios.md
@@ -0,0 +1,8 @@
+---
+id: datepickerios
+title: '❌ DatePickerIOS'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=datepicker) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/debugging-native-code.md b/website/versioned_docs/version-0.86/debugging-native-code.md
new file mode 100644
index 00000000000..7595151b0be
--- /dev/null
+++ b/website/versioned_docs/version-0.86/debugging-native-code.md
@@ -0,0 +1,79 @@
+---
+id: debugging-native-code
+title: Debugging Native Code
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+
+
Projects with Native Code Only
+
The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on prebuild to use this API.
+
+
+## Accessing Logs
+
+You can display the native logs for an iOS or Android app by using the following commands in a terminal while the app is running:
+
+```shell
+# For Android:
+npx react-native log-android
+# Or, for iOS:
+npx react-native log-ios
+```
+
+You may also access these through Debug > Open System Log… in the iOS Simulator or by running `adb logcat "*:S" ReactNative:V ReactNativeJS:V` in a terminal while an Android app is running on a device or emulator.
+
+
+**💡 Custom Native Logs**
+
+If you are writing a Native Module and want to add custom logs to your module for debugging purposes, you can use the following method:
+
+#### Android (Java/Kotlin)
+
+In your native module, use the `Log` class to add logs that can be viewed in Logcat:
+
+```java
+import android.util.Log;
+
+private void log(String message) {
+ Log.d("YourModuleName", message);
+}
+```
+
+To view these logs in Logcat, use this command, replacing `YourModuleName` with your custom tag:
+
+```shell
+adb logcat "*:S" ReactNative:V ReactNativeJS:V YourModuleName:D
+```
+
+#### iOS (Objective-C/Swift)
+
+In your native module, use `NSLog` for custom logs:
+
+```objective-c
+NSLog(@"YourModuleName: %@", message);
+```
+
+Or, in Swift:
+
+```swift
+print("YourModuleName: \(message)")
+```
+
+These logs will appear in the Xcode console when running the app.
+
+
+
+## Debugging in a Native IDE
+
+When working with native code, such as when writing native modules, you can launch the app from Android Studio or Xcode and take advantage of the native debugging features (setting up breakpoints, etc.) as you would in case of building a standard native app.
+
+Another option is to run your application using the React Native CLI and attach the native debugger of the native IDE (Android Studio or Xcode) to the process.
+
+### Android Studio
+
+On Android Studio you can do this by going on the "Run" option on the menu bar, clicking on "Attach to Process..." and selecting the running React Native app.
+
+### Xcode
+
+On Xcode click on "Debug" on the top menu bar, select the "Attach to process" option, and select the application in the list of "Likely Targets".
diff --git a/website/versioned_docs/version-0.86/debugging-release-builds.md b/website/versioned_docs/version-0.86/debugging-release-builds.md
new file mode 100644
index 00000000000..6d655859a78
--- /dev/null
+++ b/website/versioned_docs/version-0.86/debugging-release-builds.md
@@ -0,0 +1,97 @@
+---
+id: debugging-release-builds
+title: Debugging Release Builds
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+## Symbolicating a stack trace
+
+If a React Native app throws an unhandled exception in a release build, the output may be obfuscated and hard to read.
+
+```shell
+07-15 10:58:25.820 18979 18998 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
+07-15 10:58:25.820 18979 18998 E AndroidRuntime: Process: com.awesomeproject, PID: 18979 07-15 10:58:25.820 18979 18998 E AndroidRuntime: com.facebook.react.common.JavascriptException: Failed, js engine: hermes, stack:
+07-15 10:58:25.820 18979 18998 E AndroidRuntime: p@1:132161
+07-15 10:58:25.820 18979 18998 E AndroidRuntime: p@1:132084
+07-15 10:58:25.820 18979 18998 E AndroidRuntime: f@1:131854
+07-15 10:58:25.820 18979 18998 E AndroidRuntime: anonymous@1:131119
+```
+
+In the above stack trace, entries like `p@1:132161` are minified function names and bytecode offsets. To debug these calls, we want to translate these into file, line, and function name, e.g. `AwesomeProject/App.js:54:initializeMap`. This is known as **symbolication.**
+
+You can symbolicate minified function names and bytecode like the above by passing the stack trace and a generated source map to [`metro-symbolicate`](https://www.npmjs.com/package/metro-symbolicate).
+
+### Enabling source maps
+
+Source maps are required to symbolicate stack traces. Make sure that source maps are enabled within the build config for the target platform.
+
+
+
+
+:::info
+On Android, source maps are **enabled** by default.
+:::
+
+To enable source map generation, ensure the following `hermesFlags` are present in `android/app/build.gradle`.
+
+```groovy
+react {
+ hermesFlags = ["-O", "-output-source-map"]
+}
+```
+
+If done correctly you should see the output location of the source map during Metro build output.
+
+```text
+Writing bundle output to:, android/app/build/generated/assets/react/release/index.android.bundle
+Writing sourcemap output to:, android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map
+```
+
+
+
+
+:::info
+On iOS, source maps are **disabled** by default. Use the following instructions to enable them.
+:::
+
+To enable source map generation:
+
+- Open Xcode and edit the build phase "Bundle React Native code and images".
+- Above the other exports, add a `SOURCEMAP_FILE` entry with the desired output path.
+
+```diff
++ export SOURCEMAP_FILE="$(pwd)/../main.jsbundle.map"
+ WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
+```
+
+If done correctly you should see the output location of the source map during Metro build output.
+
+```text
+Writing bundle output to:, Build/Intermediates.noindex/ArchiveIntermediates/application/BuildProductsPath/Release-iphoneos/main.jsbundle
+Writing sourcemap output to:, Build/Intermediates.noindex/ArchiveIntermediates/application/BuildProductsPath/Release-iphoneos/main.jsbundle.map
+```
+
+
+
+
+### Using `metro-symbolicate`
+
+With source maps being generated, we can now translate our stack traces.
+
+```shell
+# Print usage instructions
+npx metro-symbolicate
+
+# From a file containing the stack trace
+npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map < stacktrace.txt
+
+# From adb logcat (Android)
+adb logcat -d | npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
+```
+
+### Notes on source maps
+
+- Multiple source maps may be generated by the build process. Make sure to use the one in the location shown in the examples.
+- Make sure that the source map you use corresponds to the exact commit of the crashing app. Small changes in source code can cause large differences in offsets.
+- If `metro-symbolicate` exits immediately with success, make sure the input comes from a pipe or redirection and not from a terminal.
diff --git a/website/versioned_docs/version-0.86/debugging.md b/website/versioned_docs/version-0.86/debugging.md
new file mode 100644
index 00000000000..c4c299a2677
--- /dev/null
+++ b/website/versioned_docs/version-0.86/debugging.md
@@ -0,0 +1,104 @@
+---
+id: debugging
+title: Debugging Basics
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+:::note
+Debugging features, such as the Dev Menu, LogBox, and React Native DevTools are disabled in release (production) builds.
+:::
+
+## Opening the Dev Menu
+
+React Native provides an in-app developer menu providing access to debugging features. You can access the Dev Menu by shaking your device or via keyboard shortcuts:
+
+- iOS Simulator: Ctrl + Cmd ⌘ + Z (or Device > Shake)
+- Android emulators: Cmd ⌘ + M (macOS) or Ctrl + M (Windows and Linux)
+
+Alternative (Android): `adb shell input keyevent 82`.
+
+
+
+## Opening DevTools
+
+[React Native DevTools](./react-native-devtools) is our built-in debugger for React Native. It allows you to inspect and understand how your JavaScript code is running, similar to a web browser.
+
+To open DevTools, either:
+
+- Select "Open DevTools" in the Dev Menu.
+- Press j from the CLI.
+
+
+
+On first launch, DevTools will open to a welcome panel, along with an open console drawer where you can view logs and interact with the JavaScript runtime. From the top of the window, you can navigate to other panels, including the integrated React Components Inspector and Profiler.
+
+Learn more in our [React Native DevTools guide](./react-native-devtools).
+
+## LogBox
+
+LogBox is an in-app tool that displays when warnings or errors are logged by your app.
+
+
+
+### Fatal Errors
+
+When an unrecoverable error occurs, such as a JavaScript syntax error, LogBox will open with the location of the error. In this state, LogBox is not dismissable since your code cannot be executed. LogBox will automatically dismiss once the syntax error is fixed — either via Fast Refresh or after a manual reload.
+
+### Console Errors and Warnings
+
+Console errors and warnings are displayed as on-screen notifications with a red or yellow badge.
+
+- **Errors** will display with a notification count. Tap the notification to see an expanded view and to paginate through other logs.
+- **Warnings** will display a notification banner without details, prompting you to open React Native DevTools.
+
+When React Native DevTools is open, all errors except fatal errors will be hidden to LogBox. We recommend using the Console panel within React Native DevTools as a source of truth, due to various LogBox options which can hide or adjust the level of certain logs.
+
+
+**💡 Ignoring logs**
+
+LogBox can be configured via the `LogBox` API.
+
+```js
+import {LogBox} from 'react-native';
+```
+
+#### Ignore all logs
+
+LogBox notifications can be disabled using `LogBox.ignoreAllLogs()`. This can be useful in situations such as giving product demos.
+
+```js
+LogBox.ignoreAllLogs();
+```
+
+#### Ignore specific logs
+
+Notifications can be disabled on a per-log basis via `LogBox.ignoreLogs()`. This can be useful for noisy warnings or those that cannot be fixed, e.g. in a third-party dependency.
+
+```js
+LogBox.ignoreLogs([
+ // Exact message
+ 'Warning: componentWillReceiveProps has been renamed',
+
+ // Substring or regex match
+ /GraphQL error: .*/,
+]);
+```
+
+:::note
+
+LogBox will treat certain errors from React as warnings, which will mean they don't display as an in-app error notification. Advanced users can change this behaviour by customising LogBox's warning filter using [`LogBoxData.setWarningFilter()`](https://github.com/facebook/react-native/blob/d334f4d77eea538dff87fdcf2ebc090246cfdbb0/packages/react-native/Libraries/LogBox/Data/LogBoxData.js#L338).
+
+:::
+
+
+
+## Performance Monitor
+
+On Android and iOS, an in-app performance overlay can be toggled during development by selecting **"Perf Monitor"** in the Dev Menu. Learn more about this feature [here](/docs/performance).
+
+
+
+:::info
+The Performance Monitor runs in-app and is a guide. We recommend investigating the native tooling under Android Studio and Xcode for accurate performance measurements.
+:::
diff --git a/website/versioned_docs/version-0.86/devsettings.md b/website/versioned_docs/version-0.86/devsettings.md
new file mode 100644
index 00000000000..58cd4987e03
--- /dev/null
+++ b/website/versioned_docs/version-0.86/devsettings.md
@@ -0,0 +1,51 @@
+---
+id: devsettings
+title: DevSettings
+---
+
+The `DevSettings` module exposes methods for customizing settings for developers in development.
+
+---
+
+# Reference
+
+## Methods
+
+### `addMenuItem()`
+
+```tsx
+static addMenuItem(title: string, handler: () => any);
+```
+
+Add a custom menu item to the Dev Menu.
+
+**Parameters:**
+
+| Name | Type |
+| ------------------------------------------------------------ | -------- |
+| title
Required
| string |
+| handler
Required
| function |
+
+**Example:**
+
+```tsx
+DevSettings.addMenuItem('Show Secret Dev Screen', () => {
+ Alert.alert('Showing secret dev screen!');
+});
+```
+
+---
+
+### `reload()`
+
+```tsx
+static reload(reason?: string): void;
+```
+
+Reload the application. Can be invoked directly or on user interaction.
+
+**Example:**
+
+```tsx
+ DevSettings.reload()} />
+```
diff --git a/website/versioned_docs/version-0.86/dimensions.md b/website/versioned_docs/version-0.86/dimensions.md
new file mode 100644
index 00000000000..9ebb8561739
--- /dev/null
+++ b/website/versioned_docs/version-0.86/dimensions.md
@@ -0,0 +1,154 @@
+---
+id: dimensions
+title: Dimensions
+---
+
+:::info
+[`useWindowDimensions`](usewindowdimensions) is the preferred API for React components. Unlike `Dimensions`, it updates as the window's dimensions update. This works nicely with the React paradigm.
+:::
+
+```tsx
+import {Dimensions} from 'react-native';
+```
+
+You can get the application window's width and height using the following code:
+
+```tsx
+const windowWidth = Dimensions.get('window').width;
+const windowHeight = Dimensions.get('window').height;
+```
+
+:::note
+Although dimensions are available immediately, they may change (e.g due to device rotation, foldable devices etc) so any rendering logic or styles that depend on these constants should try to call this function on every render, rather than caching the value (for example, using inline styles rather than setting a value in a `StyleSheet`).
+:::
+
+If you are targeting foldable devices or devices which can change the screen size or app window size, you can use the event listener available in the Dimensions module as shown in the below example.
+
+## Example
+
+```SnackPlayer name=Dimensions%20Example
+import React, {useState, useEffect} from 'react';
+import {StyleSheet, Text, Dimensions} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const windowDimensions = Dimensions.get('window');
+const screenDimensions = Dimensions.get('screen');
+
+const App = () => {
+ const [dimensions, setDimensions] = useState({
+ window: windowDimensions,
+ screen: screenDimensions,
+ });
+
+ useEffect(() => {
+ const subscription = Dimensions.addEventListener(
+ 'change',
+ ({window, screen}) => {
+ setDimensions({window, screen});
+ },
+ );
+ return () => subscription?.remove();
+ });
+
+ return (
+
+
+ Window Dimensions
+ {Object.entries(dimensions.window).map(([key, value]) => (
+
+ {key} - {value}
+
+ ))}
+ Screen Dimensions
+ {Object.entries(dimensions.screen).map(([key, value]) => (
+
+ {key} - {value}
+
+ ))}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ header: {
+ fontSize: 16,
+ marginVertical: 10,
+ },
+});
+
+export default App;
+```
+
+# Reference
+
+## Methods
+
+### `addEventListener()`
+
+```tsx
+static addEventListener(
+ type: 'change',
+ handler: ({
+ window,
+ screen,
+ }: DimensionsValue) => void,
+): EmitterSubscription;
+```
+
+Add an event handler. Supported events:
+
+- `change`: Fires when a property within the `Dimensions` object changes. The argument to the event handler is a [`DimensionsValue`](#dimensionsvalue) type object.
+
+---
+
+### `get()`
+
+```tsx
+static get(dim: 'window' | 'screen'): ScaledSize;
+```
+
+Initial dimensions are set before `runApplication` is called so they should be available before any other require's are run, but may be updated later.
+
+Example: `const {height, width} = Dimensions.get('window');`
+
+**Parameters:**
+
+| Name | Type | Description |
+| ------------------------------------------------------------------ | ------ | --------------------------------------------------------------------------------- |
+| dim
Required
| string | Name of dimension as defined when calling `set`. Returns value for the dimension. |
+
+:::note
+For Android the `window` dimension will be reduced by the size of status bar (if not translucent) and bottom navigation bar.
+:::
+
+## Type Definitions
+
+### DimensionsValue
+
+**Properties:**
+
+| Name | Type | Description |
+| ------ | ----------------------------------- | --------------------------------------- |
+| window | [ScaledSize](dimensions#scaledsize) | Size of the visible Application window. |
+| screen | [ScaledSize](dimensions#scaledsize) | Size of the device's screen. |
+
+### ScaledSize
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type |
+| --------- | ------ |
+| width | number |
+| height | number |
+| scale | number |
+| fontScale | number |
diff --git a/website/versioned_docs/version-0.86/document-nodes.md b/website/versioned_docs/version-0.86/document-nodes.md
new file mode 100644
index 00000000000..978ef87a1f8
--- /dev/null
+++ b/website/versioned_docs/version-0.86/document-nodes.md
@@ -0,0 +1,75 @@
+---
+id: document-nodes
+title: Document nodes
+---
+
+Document nodes represent a complete native view tree. Apps using native navigation would provide a separate document node for each screen. Apps not using native navigation would generally provide a single document for the whole app (similar to single-page apps on Web).
+
+```SnackPlayer ext=js&name=Document%20instance%20example
+import * as React from 'react';
+import {Text, TextInput, View} from 'react-native';
+
+function MyComponent(props) {
+ return (
+
+ Start typing below
+
+
+ )
+}
+
+export default function AccessingDocument() {
+ const ref = React.useRef(null);
+
+ React.useEffect(() => {
+ // Get the main text input in the screen and focus it after initial load.
+ const element = ref.current;
+ const doc = element.ownerDocument;
+ const textInput = doc.getElementById('main-text-input');
+ textInput?.focus();
+ }, []);
+
+ return (
+
+ );
+}
+```
+
+---
+
+## Reference
+
+### Web-compatible API
+
+From [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement):
+
+- Properties
+ - [`childElementCount`](https://developer.mozilla.org/en-US/docs/Web/API/Document/childElementCount)
+ - [`children`](https://developer.mozilla.org/en-US/docs/Web/API/Document/children)
+ - [`documentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Document/documentElement)
+ - [`firstElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Document/firstElementChild)
+ - [`lastElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Document/lastElementChild)
+- Methods
+ - [`getElementById()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById)
+
+From [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node):
+
+- Properties
+ - [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
+ - [`firstChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild)
+ - [`isConnected`](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
+ - [`lastChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild)
+ - [`nextSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling)
+ - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName)
+ - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)
+ - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)
+ - [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument)
+ - [`parentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement)
+ - [`parentNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode)
+ - [`previousSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/previousSibling)
+ - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)
+- Methods
+ - [`compareDocumentPosition()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition)
+ - [`contains()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
+ - [`getRootNode()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
+ - [`hasChildNodes()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/hasChildNodes)
diff --git a/website/versioned_docs/version-0.86/drawerlayoutandroid.md b/website/versioned_docs/version-0.86/drawerlayoutandroid.md
new file mode 100644
index 00000000000..3714318df5c
--- /dev/null
+++ b/website/versioned_docs/version-0.86/drawerlayoutandroid.md
@@ -0,0 +1,323 @@
+---
+id: drawerlayoutandroid
+title: DrawerLayoutAndroid
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+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.
+
+## Example
+
+
+
+
+```SnackPlayer name=DrawerLayoutAndroid%20Component%20Example&supportedPlatforms=android&ext=js
+import React, {useRef, useState} from 'react';
+import {Button, DrawerLayoutAndroid, Text, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const drawer = useRef(null);
+ const [drawerPosition, setDrawerPosition] = useState('left');
+ const changeDrawerPosition = () => {
+ if (drawerPosition === 'left') {
+ setDrawerPosition('right');
+ } else {
+ setDrawerPosition('left');
+ }
+ };
+
+ const navigationView = () => (
+
+ I'm in the Drawer!
+ drawer.current.closeDrawer()}
+ />
+
+ );
+
+ return (
+
+
+
+ Drawer on the {drawerPosition}!
+ changeDrawerPosition()}
+ />
+
+ Swipe from the side or press button below to see it!
+
+ drawer.current.openDrawer()}
+ />
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingHorizontal: 16,
+ },
+ navigationContainer: {
+ backgroundColor: '#ecf0f1',
+ },
+ paragraph: {
+ padding: 16,
+ fontSize: 15,
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=DrawerLayoutAndroid%20Component%20Example&supportedPlatforms=android&ext=tsx
+import React, {useRef, useState} from 'react';
+import {
+ Button,
+ DrawerLayoutAndroid,
+ Text,
+ StyleSheet,
+ View,
+} from 'react-native';
+
+const App = () => {
+ const drawer = useRef(null);
+ const [drawerPosition, setDrawerPosition] = useState<'left' | 'right'>(
+ 'left',
+ );
+ const changeDrawerPosition = () => {
+ if (drawerPosition === 'left') {
+ setDrawerPosition('right');
+ } else {
+ setDrawerPosition('left');
+ }
+ };
+
+ const navigationView = () => (
+
+ I'm in the Drawer!
+ drawer.current?.closeDrawer()}
+ />
+
+ );
+
+ return (
+
+
+ Drawer on the {drawerPosition}!
+ changeDrawerPosition()}
+ />
+
+ Swipe from the side or press button below to see it!
+
+ drawer.current?.openDrawer()}
+ />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ padding: 16,
+ },
+ navigationContainer: {
+ backgroundColor: '#ecf0f1',
+ },
+ paragraph: {
+ padding: 16,
+ fontSize: 15,
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view.md#props).
+
+---
+
+### `drawerBackgroundColor`
+
+Specifies the background color of the drawer. The default value is `white`. If you want to set the opacity of the drawer, use rgba. Example:
+
+```tsx
+return (
+
+);
+```
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `drawerLockMode`
+
+Specifies the lock mode of the drawer. The drawer can be locked in 3 states:
+
+- unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.
+- locked-closed, meaning that the drawer will stay closed and not respond to gestures.
+- locked-open, meaning that the drawer will stay opened and not respond to gestures. The drawer may still be opened and closed programmatically (`openDrawer`/`closeDrawer`).
+
+| Type | Required |
+| ------------------------------------------------ | -------- |
+| enum('unlocked', 'locked-closed', 'locked-open') | No |
+
+---
+
+### `drawerPosition`
+
+Specifies the side of the screen from which the drawer will slide in. By default it is set to `left`.
+
+| Type | Required |
+| --------------------- | -------- |
+| enum('left', 'right') | No |
+
+---
+
+### `drawerWidth`
+
+Specifies the width of the drawer, more precisely the width of the view that be pulled in from the edge of the window.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `keyboardDismissMode`
+
+Determines whether the keyboard gets dismissed in response to a drag.
+
+- 'none' (the default), drags do not dismiss the keyboard.
+- 'on-drag', the keyboard is dismissed when a drag begins.
+
+| Type | Required |
+| ----------------------- | -------- |
+| enum('none', 'on-drag') | No |
+
+---
+
+### `onDrawerClose`
+
+Function called whenever the navigation view has been closed.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onDrawerOpen`
+
+Function called whenever the navigation view has been opened.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onDrawerSlide`
+
+Function called whenever there is an interaction with the navigation view.
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `onDrawerStateChanged`
+
+Function called when the drawer state has changed. The drawer can be in 3 states:
+
+- idle, meaning there is no interaction with the navigation view happening at the time
+- dragging, meaning there is currently an interaction with the navigation view
+- settling, meaning that there was an interaction with the navigation view, and the navigation view is now finishing its closing or opening animation
+
+| Type | Required |
+| -------- | -------- |
+| function | No |
+
+---
+
+### `renderNavigationView`
+
+The navigation view that will be rendered to the side of the screen and can be pulled in.
+
+| Type | Required |
+| -------- | -------- |
+| function | Yes |
+
+---
+
+### `statusBarBackgroundColor`
+
+Make the drawer take the entire screen and draw the background of the status bar to allow it to open over the status bar. It will only have an effect on API 21+.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+## Methods
+
+### `closeDrawer()`
+
+```tsx
+closeDrawer();
+```
+
+Closes the drawer.
+
+---
+
+### `openDrawer()`
+
+```tsx
+openDrawer();
+```
+
+Opens the drawer.
diff --git a/website/versioned_docs/version-0.86/dropshadowvalue.md b/website/versioned_docs/version-0.86/dropshadowvalue.md
new file mode 100644
index 00000000000..11950316091
--- /dev/null
+++ b/website/versioned_docs/version-0.86/dropshadowvalue.md
@@ -0,0 +1,55 @@
+---
+id: dropshadowvalue
+title: DropShadowValue Object Type
+---
+
+The `DropShadowValue` object is taken by the [`filter`](./view-style-props.md#filter) style prop for the `dropShadow` function. It is comprised of 2 or 3 lengths and an optional color. These values collectively define the drop shadow's color, position, and blurriness.
+
+## Example
+
+```js
+{
+ offsetX: 10,
+ offsetY: -3,
+ standardDeviation: '15px',
+ color: 'blue',
+}
+```
+
+## Keys and values
+
+### `offsetX`
+
+The offset on the x-axis. This can be positive or negative. A positive value indicates right and negative indicates left.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | No |
+
+### `offsetY`
+
+The offset on the y-axis. This can be positive or negative. A positive value indicates up and negative indicates down.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | No |
+
+### `standardDeviation`
+
+Represents the standard deviation used in the [Gaussian blur](https://en.wikipedia.org/wiki/Gaussian_blur) algorithm. The larger the value the blurrier the shadow is. Only non-negative values are valid. The default is 0.
+
+| Type | Optional |
+| ---------------- | -------- |
+| number \| string | Yes |
+
+### `color`
+
+The color of the shadow. The default is `black`.
+
+| Type | Optional |
+| -------------------- | -------- |
+| [color](./colors.md) | Yes |
+
+## Used by
+
+- [`filter`](./view-style-props.md#filter)
diff --git a/website/versioned_docs/version-0.86/dynamiccolorios.md b/website/versioned_docs/version-0.86/dynamiccolorios.md
new file mode 100644
index 00000000000..08b024d15f6
--- /dev/null
+++ b/website/versioned_docs/version-0.86/dynamiccolorios.md
@@ -0,0 +1,59 @@
+---
+id: dynamiccolorios
+title: DynamicColorIOS
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+The `DynamicColorIOS` function is a platform color type specific to iOS.
+
+```tsx
+DynamicColorIOS({
+ light: color,
+ dark: color,
+ highContrastLight: color, // (optional) will fallback to "light" if not provided
+ highContrastDark: color, // (optional) will fallback to "dark" if not provided
+});
+```
+
+`DynamicColorIOS` takes a single argument as an object with two mandatory keys: `dark` and `light`, and two optional keys `highContrastLight` and `highContrastDark`. These correspond to the colors you want to use for "light mode" and "dark mode" on iOS, and when high contrast accessibility mode is enabled, high contrast version of them.
+
+At runtime, the system will choose which of the colors to display depending on the current system appearance and accessibility settings. Dynamic colors are useful for branding colors or other app specific colors that still respond automatically to system setting changes.
+
+#### Developer notes
+
+
+
+
+
+:::info
+If you’re familiar with `@media (prefers-color-scheme: dark)` in CSS, this is similar! Only instead of defining all the colors in a media query, you define which color to use under what circumstances right there where you're using it. Neat!
+:::
+
+
+
+
+:::info
+The `DynamicColorIOS` function is similar to the iOS native methods [`UIColor colorWithDynamicProvider:`](https://developer.apple.com/documentation/uikit/uicolor/3238040-colorwithdynamicprovider).
+:::
+
+
+
+
+## Example
+
+```tsx
+import {DynamicColorIOS} from 'react-native';
+
+const customDynamicTextColor = DynamicColorIOS({
+ dark: 'lightskyblue',
+ light: 'midnightblue',
+});
+
+const customContrastDynamicTextColor = DynamicColorIOS({
+ dark: 'darkgray',
+ light: 'lightgray',
+ highContrastDark: 'black',
+ highContrastLight: 'white',
+});
+```
diff --git a/website/versioned_docs/version-0.86/easing.md b/website/versioned_docs/version-0.86/easing.md
new file mode 100644
index 00000000000..bb31dd0e4fa
--- /dev/null
+++ b/website/versioned_docs/version-0.86/easing.md
@@ -0,0 +1,568 @@
+---
+id: easing
+title: Easing
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+The `Easing` module implements common easing functions. This module is used by [`Animated.timing()`](animated.md#timing) to convey physically believable motion in animations.
+
+You can find a visualization of some common easing functions at https://easings.net/
+
+### Predefined animations
+
+The `Easing` module provides several predefined animations through the following methods:
+
+- [`back`](easing.md#back) provides a basic animation where the object goes slightly back before moving forward
+- [`bounce`](easing.md#bounce) provides a bouncing animation
+- [`ease`](easing.md#ease) provides a basic inertial animation
+- [`elastic`](easing.md#elastic) provides a basic spring interaction
+
+### Standard functions
+
+Three standard easing functions are provided:
+
+- [`linear`](easing.md#linear)
+- [`quad`](easing.md#quad)
+- [`cubic`](easing.md#cubic)
+
+The [`poly`](easing.md#poly) function can be used to implement quartic, quintic, and other higher power functions.
+
+### Additional functions
+
+Additional mathematical functions are provided by the following methods:
+
+- [`bezier`](easing.md#bezier) provides a cubic bezier curve
+- [`circle`](easing.md#circle) provides a circular function
+- [`sin`](easing.md#sin) provides a sinusoidal function
+- [`exp`](easing.md#exp) provides an exponential function
+
+The following helpers are used to modify other easing functions.
+
+- [`in`](easing.md#in) runs an easing function forwards
+- [`inOut`](easing.md#inout) makes any easing function symmetrical
+- [`out`](easing.md#out) runs an easing function backwards
+
+## Example
+
+
+
+
+```SnackPlayer name=Easing%20Demo&ext=js
+import React, {useRef} from 'react';
+import {
+ Animated,
+ Easing,
+ SectionList,
+ StatusBar,
+ StyleSheet,
+ Text,
+ TouchableOpacity,
+ View,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const opacity = useRef(new Animated.Value(0)).current;
+
+ const animate = easing => {
+ opacity.setValue(0);
+ Animated.timing(opacity, {
+ toValue: 1,
+ duration: 1200,
+ easing,
+ useNativeDriver: false,
+ }).start();
+ };
+
+ const size = opacity.interpolate({
+ inputRange: [0, 1],
+ outputRange: [0, 80],
+ });
+
+ const animatedStyles = [
+ styles.box,
+ {
+ opacity,
+ width: size,
+ height: size,
+ },
+ ];
+
+ return (
+
+
+
+
+ Press rows below to preview the Easing!
+
+
+
+
+ item.title}
+ renderItem={({item}) => (
+ animate(item.easing)}
+ style={styles.listRow}>
+ {item.title}
+
+ )}
+ renderSectionHeader={({section: {title}}) => (
+ {title}
+ )}
+ />
+
+
+ );
+};
+
+const SECTIONS = [
+ {
+ title: 'Predefined animations',
+ data: [
+ {title: 'Bounce', easing: Easing.bounce},
+ {title: 'Ease', easing: Easing.ease},
+ {title: 'Elastic', easing: Easing.elastic(4)},
+ ],
+ },
+ {
+ title: 'Standard functions',
+ data: [
+ {title: 'Linear', easing: Easing.linear},
+ {title: 'Quad', easing: Easing.quad},
+ {title: 'Cubic', easing: Easing.cubic},
+ ],
+ },
+ {
+ title: 'Additional functions',
+ data: [
+ {
+ title: 'Bezier',
+ easing: Easing.bezier(0, 2, 1, -1),
+ },
+ {title: 'Circle', easing: Easing.circle},
+ {title: 'Sin', easing: Easing.sin},
+ {title: 'Exp', easing: Easing.exp},
+ ],
+ },
+ {
+ title: 'Combinations',
+ data: [
+ {
+ title: 'In + Bounce',
+ easing: Easing.in(Easing.bounce),
+ },
+ {
+ title: 'Out + Exp',
+ easing: Easing.out(Easing.exp),
+ },
+ {
+ title: 'InOut + Elastic',
+ easing: Easing.inOut(Easing.elastic(1)),
+ },
+ ],
+ },
+];
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: '#20232a',
+ },
+ title: {
+ marginTop: 10,
+ textAlign: 'center',
+ color: '#61dafb',
+ },
+ boxContainer: {
+ height: 160,
+ alignItems: 'center',
+ },
+ box: {
+ marginTop: 32,
+ borderRadius: 4,
+ backgroundColor: '#61dafb',
+ },
+ list: {
+ backgroundColor: '#fff',
+ },
+ listHeader: {
+ paddingHorizontal: 8,
+ paddingVertical: 4,
+ backgroundColor: '#f4f4f4',
+ color: '#999',
+ fontSize: 12,
+ textTransform: 'uppercase',
+ },
+ listRow: {
+ padding: 8,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Easing%20Demo&ext=tsx
+import React, {useRef} from 'react';
+import {
+ Animated,
+ Easing,
+ SectionList,
+ StatusBar,
+ StyleSheet,
+ Text,
+ TouchableOpacity,
+ View,
+ type EasingFunction,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const opacity = useRef(new Animated.Value(0)).current;
+
+ const animate = (easing: EasingFunction) => {
+ opacity.setValue(0);
+ Animated.timing(opacity, {
+ toValue: 1,
+ duration: 1200,
+ easing,
+ useNativeDriver: false,
+ }).start();
+ };
+
+ const size = opacity.interpolate({
+ inputRange: [0, 1],
+ outputRange: [0, 80],
+ });
+
+ const animatedStyles = [
+ styles.box,
+ {
+ opacity,
+ width: size,
+ height: size,
+ },
+ ];
+
+ return (
+
+
+
+
+ Press rows below to preview the Easing!
+
+
+
+
+ item.title}
+ renderItem={({item}) => (
+ animate(item.easing)}
+ style={styles.listRow}>
+ {item.title}
+
+ )}
+ renderSectionHeader={({section: {title}}) => (
+ {title}
+ )}
+ />
+
+
+ );
+};
+
+const SECTIONS = [
+ {
+ title: 'Predefined animations',
+ data: [
+ {title: 'Bounce', easing: Easing.bounce},
+ {title: 'Ease', easing: Easing.ease},
+ {title: 'Elastic', easing: Easing.elastic(4)},
+ ],
+ },
+ {
+ title: 'Standard functions',
+ data: [
+ {title: 'Linear', easing: Easing.linear},
+ {title: 'Quad', easing: Easing.quad},
+ {title: 'Cubic', easing: Easing.cubic},
+ ],
+ },
+ {
+ title: 'Additional functions',
+ data: [
+ {
+ title: 'Bezier',
+ easing: Easing.bezier(0, 2, 1, -1),
+ },
+ {title: 'Circle', easing: Easing.circle},
+ {title: 'Sin', easing: Easing.sin},
+ {title: 'Exp', easing: Easing.exp},
+ ],
+ },
+ {
+ title: 'Combinations',
+ data: [
+ {
+ title: 'In + Bounce',
+ easing: Easing.in(Easing.bounce),
+ },
+ {
+ title: 'Out + Exp',
+ easing: Easing.out(Easing.exp),
+ },
+ {
+ title: 'InOut + Elastic',
+ easing: Easing.inOut(Easing.elastic(1)),
+ },
+ ],
+ },
+];
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: '#20232a',
+ },
+ title: {
+ marginTop: 10,
+ textAlign: 'center',
+ color: '#61dafb',
+ },
+ boxContainer: {
+ height: 160,
+ alignItems: 'center',
+ },
+ box: {
+ marginTop: 32,
+ borderRadius: 4,
+ backgroundColor: '#61dafb',
+ },
+ list: {
+ backgroundColor: '#fff',
+ },
+ listHeader: {
+ paddingHorizontal: 8,
+ paddingVertical: 4,
+ backgroundColor: '#f4f4f4',
+ color: '#999',
+ fontSize: 12,
+ textTransform: 'uppercase',
+ },
+ listRow: {
+ padding: 8,
+ },
+});
+
+export default App;
+```
+
+
+
+
+---
+
+# Reference
+
+## Methods
+
+### `step0()`
+
+```tsx
+static step0(n: number);
+```
+
+A stepping function, returns 1 for any positive value of `n`.
+
+---
+
+### `step1()`
+
+```tsx
+static step1(n: number);
+```
+
+A stepping function, returns 1 if `n` is greater than or equal to 1.
+
+---
+
+### `linear()`
+
+```tsx
+static linear(t: number);
+```
+
+A linear function, `f(t) = t`. Position correlates to elapsed time one to one.
+
+https://cubic-bezier.com/#0,0,1,1
+
+---
+
+### `ease()`
+
+```tsx
+static ease(t: number);
+```
+
+A basic inertial interaction, similar to an object slowly accelerating to speed.
+
+https://cubic-bezier.com/#.42,0,1,1
+
+---
+
+### `quad()`
+
+```tsx
+static quad(t: number);
+```
+
+A quadratic function, `f(t) = t * t`. Position equals the square of elapsed time.
+
+https://easings.net/#easeInQuad
+
+---
+
+### `cubic()`
+
+```tsx
+static cubic(t: number);
+```
+
+A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed time.
+
+https://easings.net/#easeInCubic
+
+---
+
+### `poly()`
+
+```tsx
+static poly(n: number);
+```
+
+A power function. Position is equal to the Nth power of elapsed time.
+
+n = 4: https://easings.net/#easeInQuart n = 5: https://easings.net/#easeInQuint
+
+---
+
+### `sin()`
+
+```tsx
+static sin(t: number);
+```
+
+A sinusoidal function.
+
+https://easings.net/#easeInSine
+
+---
+
+### `circle()`
+
+```tsx
+static circle(t: number);
+```
+
+A circular function.
+
+https://easings.net/#easeInCirc
+
+---
+
+### `exp()`
+
+```tsx
+static exp(t: number);
+```
+
+An exponential function.
+
+https://easings.net/#easeInExpo
+
+---
+
+### `elastic()`
+
+```tsx
+static elastic(bounciness: number);
+```
+
+A basic elastic interaction, similar to a spring oscillating back and forth.
+
+Default bounciness is 1, which overshoots a little bit once. 0 bounciness doesn't overshoot at all, and bounciness of N > 1 will overshoot about N times.
+
+https://easings.net/#easeInElastic
+
+---
+
+### `back()`
+
+```tsx
+static back(s)
+```
+
+Use with `Animated.parallel()` to create a basic effect where the object animates back slightly as the animation starts.
+
+---
+
+### `bounce()`
+
+```tsx
+static bounce(t: number);
+```
+
+Provides a basic bouncing effect.
+
+https://easings.net/#easeInBounce
+
+---
+
+### `bezier()`
+
+```tsx
+static bezier(x1: number, y1: number, x2: number, y2: number);
+```
+
+Provides a cubic bezier curve, equivalent to CSS Transitions' `transition-timing-function`.
+
+A useful tool to visualize cubic bezier curves can be found at https://cubic-bezier.com/
+
+---
+
+### `in()`
+
+```tsx
+static in(easing: number);
+```
+
+Runs an easing function forwards.
+
+---
+
+### `out()`
+
+```tsx
+static out(easing: number);
+```
+
+Runs an easing function backwards.
+
+---
+
+### `inOut()`
+
+```tsx
+static inOut(easing: number);
+```
+
+Makes any easing function symmetrical. The easing function will run forwards for half of the duration, then backwards for the rest of the duration.
diff --git a/website/versioned_docs/version-0.86/element-nodes.md b/website/versioned_docs/version-0.86/element-nodes.md
new file mode 100644
index 00000000000..654c870b37f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/element-nodes.md
@@ -0,0 +1,135 @@
+---
+id: element-nodes
+title: Element nodes
+---
+
+Element nodes represent native components in the native view tree (similar to [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) nodes on Web).
+
+They are provided by all native components, and by many built-in components, via refs:
+
+```SnackPlayer ext=js&name=Element%20instances%20example
+import * as React from 'react';
+import { View, SafeAreaView, StyleSheet, Text } from 'react-native';
+
+const ViewWithRefs = () => {
+ const ref = React.useRef(null);
+ const [viewInfo, setViewInfo] = React.useState('');
+
+ React.useEffect(() => {
+ // `element` is an object implementing the interface described here.
+ const element = ref.current;
+ const rect = JSON.stringify(element.getBoundingClientRect());
+ setViewInfo(
+ `Bounding rect is: ${rect}.\nText content is: ${element.textContent}`,
+ );
+ }, []);
+
+ return (
+
+
+ Hello world!
+
+ {viewInfo}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ content: {
+ padding: 10,
+ backgroundColor: 'gray',
+ },
+});
+
+export default ViewWithRefs;
+```
+
+:::info
+Note that some built-in components are only a container for other components (including native components). For example, `ScrollView` internally renders a native scroll view and a native view, which are accessible through the ref it provides using methods like `getNativeScrollRef()` and `getInnerViewRef()`.
+:::
+
+---
+
+## Reference
+
+### Web-compatible API
+
+From [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement):
+
+- Properties
+ - [`offsetHeight`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight)
+ - [`offsetLeft`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft)
+ - [`offsetParent`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent)
+ - [`offsetTop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop)
+ - [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth)
+- Methods
+ - [`blur()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur).
+ - [`focus()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus).
+ - ⚠️ The `options` parameter is not supported.
+
+From [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element):
+
+- Properties
+ - [`childElementCount`](https://developer.mozilla.org/en-US/docs/Web/API/Element/childElementCount)
+ - [`children`](https://developer.mozilla.org/en-US/docs/Web/API/Element/children)
+ - [`clientHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight)
+ - [`clientLeft`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientLeft)
+ - [`clientTop`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientTop)
+ - [`clientWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth)
+ - [`firstElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Element/firstElementChild)
+ - [`id`](https://developer.mozilla.org/en-US/docs/Web/API/Element/id)
+ - ℹ️ Returns the value of the `id` or `nativeID` props.
+ - [`lastElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Element/lastElementChild)
+ - [`nextElementSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nextElementSibling)
+ - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName)
+ - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)
+ - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)
+ - [`previousElementSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Element/previousElementSibling)
+ - [`scrollHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight)
+ - [`scrollLeft`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft)
+ - ⚠️ For built-in components, only `ScrollView` instances can return a value other than zero.
+ - [`scrollTop`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop)
+ - ⚠️ For built-in components, only `ScrollView` instances can return a value other than zero.
+ - [`scrollWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth)
+ - [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName)
+ - ℹ️ Returns a normalized native component name prefixed with `RN:`, like `RN:View`.
+ - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)
+- Methods
+ - [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect)
+ - [`hasPointerCapture()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasPointerCapture)
+ - [`setPointerCapture()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture)
+ - [`releasePointerCapture()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/releasePointerCapture)
+
+From [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node):
+
+- Properties
+ - [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
+ - [`firstChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild)
+ - [`isConnected`](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
+ - [`lastChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild)
+ - [`nextSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling)
+ - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName)
+ - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)
+ - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)
+ - [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument)
+ - ℹ️ Will return the [document node](/docs/next/document-nodes) where this component was rendered.
+ - [`parentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement)
+ - [`parentNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode)
+ - [`previousSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/previousSibling)
+ - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)
+- Methods
+ - [`compareDocumentPosition()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition)
+ - [`contains()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
+ - [`getRootNode()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
+ - ℹ️ Will return a reference to itself if the component is not mounted.
+ - [`hasChildNodes()`](https://developer.mozilla.org/en-US/docs/Web/API/Node/hasChildNodes)
+
+### Legacy API
+
+- [`measure()`](/docs/next/legacy/direct-manipulation#measurecallback)
+- [`measureInWindow()`](/docs/next/legacy/direct-manipulation#measureinwindowcallback)
+- [`measureLayout()`](/docs/next/legacy/direct-manipulation#measurelayoutrelativetonativecomponentref-onsuccess-onfail)
+- [`setNativeProps()`](/docs/next/legacy/direct-manipulation#setnativeprops-with-touchableopacity)
diff --git a/website/versioned_docs/version-0.86/fabric-native-components-android.md b/website/versioned_docs/version-0.86/fabric-native-components-android.md
new file mode 100644
index 00000000000..85088661d6f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/fabric-native-components-android.md
@@ -0,0 +1,500 @@
+---
+id: fabric-native-components-android
+title: 'Fabric Native Modules: Android'
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Now it's time to write some Android platform code to be able to render the web view. The steps you need to follow are:
+
+- Running Codegen
+- Write the code for the `ReactWebView`
+- Write the code for the `ReactWebViewManager`
+- Write the code for the `ReactWebViewPackage`
+- Register the `ReactWebViewPackage` in the application
+
+### 1. Run Codegen through Gradle
+
+Run this once to generate boilerplate that your IDE of choice can use.
+
+```bash title="Demo/"
+cd android
+./gradlew generateCodegenArtifactsFromSchema
+```
+
+Codegen will generate the `ViewManager` interface you need to implement and the `ViewManager` delegate for the web view.
+
+### 2. Write the `ReactWebView`
+
+The `ReactWebView` is the component that wraps the Android native view that React Native will render when using our custom Component.
+
+Create a `ReactWebView.java` or a `ReactWebView.kt` file in the `android/src/main/java/com/webview` folder with this code:
+
+
+
+
+```java title="Demo/android/src/main/java/com/webview/ReactWebView.java"
+package com.webview;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+
+import com.facebook.react.bridge.Arguments;
+import com.facebook.react.bridge.WritableMap;
+import com.facebook.react.bridge.ReactContext;
+import com.facebook.react.uimanager.UIManagerHelper;
+import com.facebook.react.uimanager.events.Event;
+
+public class ReactWebView extends WebView {
+ public ReactWebView(Context context) {
+ super(context);
+ configureComponent();
+ }
+
+ public ReactWebView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ configureComponent();
+ }
+
+ public ReactWebView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ configureComponent();
+ }
+
+ private void configureComponent() {
+ this.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
+ this.setWebViewClient(new WebViewClient() {
+ @Override
+ public void onPageFinished(WebView view, String url) {
+ emitOnScriptLoaded(OnScriptLoadedEventResult.success);
+ }
+ });
+ }
+
+ public void emitOnScriptLoaded(OnScriptLoadedEventResult result) {
+ ReactContext reactContext = (ReactContext) context;
+ int surfaceId = UIManagerHelper.getSurfaceId(reactContext);
+ EventDispatcher eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, getId());
+ WritableMap payload = Arguments.createMap();
+ payload.putString("result", result.name());
+
+ OnScriptLoadedEvent event = new OnScriptLoadedEvent(surfaceId, getId(), payload);
+ if (eventDispatcher != null) {
+ eventDispatcher.dispatchEvent(event);
+ }
+ }
+
+ public enum OnScriptLoadedEventResult {
+ success,
+ error
+ }
+
+ private class OnScriptLoadedEvent extends Event {
+ private final WritableMap payload;
+
+ OnScriptLoadedEvent(int surfaceId, int viewId, WritableMap payload) {
+ super(surfaceId, viewId);
+ this.payload = payload;
+ }
+
+ @Override
+ public String getEventName() {
+ return "onScriptLoaded";
+ }
+
+ @Override
+ public WritableMap getEventData() {
+ return payload;
+ }
+ }
+}
+```
+
+
+
+
+```kotlin title="Demo/android/src/main/java/com/webview/ReactWebView.kt"
+package com.webview
+
+import android.content.Context
+import android.util.AttributeSet
+import android.webkit.WebView
+import android.webkit.WebViewClient
+import com.facebook.react.bridge.Arguments
+import com.facebook.react.bridge.WritableMap
+import com.facebook.react.bridge.ReactContext
+import com.facebook.react.uimanager.UIManagerHelper
+import com.facebook.react.uimanager.events.Event
+
+class ReactWebView: WebView {
+ constructor(context: Context) : super(context) {
+ configureComponent()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
+ configureComponent()
+ }
+
+ constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
+ configureComponent()
+ }
+
+ private fun configureComponent() {
+ this.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
+ this.webViewClient = object : WebViewClient() {
+ override fun onPageFinished(view: WebView, url: String) {
+ emitOnScriptLoaded(OnScriptLoadedEventResult.success)
+ }
+ }
+ }
+
+ fun emitOnScriptLoaded(result: OnScriptLoadedEventResult) {
+ val reactContext = context as ReactContext
+ val surfaceId = UIManagerHelper.getSurfaceId(reactContext)
+ val eventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(reactContext, id)
+ val payload =
+ Arguments.createMap().apply {
+ putString("result", result.name)
+ }
+ val event = OnScriptLoadedEvent(surfaceId, id, payload)
+
+ eventDispatcher?.dispatchEvent(event)
+ }
+
+ enum class OnScriptLoadedEventResult {
+ success,
+ error;
+ }
+
+ inner class OnScriptLoadedEvent(
+ surfaceId: Int,
+ viewId: Int,
+ private val payload: WritableMap
+ ) : Event(surfaceId, viewId) {
+ override fun getEventName() = "onScriptLoaded"
+
+ override fun getEventData() = payload
+ }
+}
+```
+
+
+
+
+The `ReactWebView` extends the Android `WebView` so you can reuse all the properties already defined by the platform with ease.
+
+The class defines the three Android constructors but defers their actual implementation to the private `configureComponent` function. This function takes care of initializing all the components specific properties: in this case you are setting the layout of the `WebView` and you are defining the `WebClient` that you use to customize the behavior of the `WebView`. In this code, the `ReactWebView` emits an event when the page finishes loading, by implementing the `WebClient`'s `onPageFinished` method.
+
+The code then defines a helper function to actually emit an event. To emit an event, you have to:
+
+- grab a reference to the `ReactContext`;
+- retrieve the `surfaceId` of the view that you are presenting;
+- grab a reference to the `eventDispatcher` associated with the view;
+- build the payload for the event using a `WritableMap` object;
+- create the event object that you need to send to JavaScript;
+- call the `eventDispatcher.dispatchEvent` to send the event.
+
+The last part of the file contains the definition of the data types you need to send the event:
+
+- The `OnScriptLoadedEventResult`, with the possible outcomes of the `OnScriptLoaded` event.
+- The actual `OnScriptLoadedEvent` that needs to extend the React Native's `Event` class.
+
+### 3. Write the `WebViewManager`
+
+The `WebViewManager` is the class that connects the React Native runtime with the native view.
+
+When React receives the instruction from the app to render a specific component, React uses the registered view manager to create the view and to pass all the required properties.
+
+This is the code of the `ReactWebViewManager`.
+
+
+
+
+```java title="Demo/android/src/main/java/com/webview/ReactWebViewManager.java"
+package com.webview;
+
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.module.annotations.ReactModule;
+import com.facebook.react.uimanager.SimpleViewManager;
+import com.facebook.react.uimanager.ThemedReactContext;
+import com.facebook.react.uimanager.ViewManagerDelegate;
+import com.facebook.react.uimanager.annotations.ReactProp;
+import com.facebook.react.viewmanagers.CustomWebViewManagerInterface;
+import com.facebook.react.viewmanagers.CustomWebViewManagerDelegate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@ReactModule(name = ReactWebViewManager.REACT_CLASS)
+class ReactWebViewManager extends SimpleViewManager implements CustomWebViewManagerInterface {
+ private final CustomWebViewManagerDelegate delegate =
+ new CustomWebViewManagerDelegate<>(this);
+
+ @Override
+ public ViewManagerDelegate getDelegate() {
+ return delegate;
+ }
+
+ @Override
+ public String getName() {
+ return REACT_CLASS;
+ }
+
+ @Override
+ public ReactWebView createViewInstance(ThemedReactContext context) {
+ return new ReactWebView(context);
+ }
+
+ @ReactProp(name = "sourceUrl")
+ @Override
+ public void setSourceURL(ReactWebView view, String sourceURL) {
+ if (sourceURL == null) {
+ view.emitOnScriptLoaded(ReactWebView.OnScriptLoadedEventResult.error);
+ return;
+ }
+ view.loadUrl(sourceURL, new HashMap<>());
+ }
+
+ public static final String REACT_CLASS = "CustomWebView";
+
+ @Override
+ public Map getExportedCustomBubblingEventTypeConstants() {
+ Map map = new HashMap<>();
+ Map bubblingMap = new HashMap<>();
+ bubblingMap.put("phasedRegistrationNames", new HashMap() {{
+ put("bubbled", "onScriptLoaded");
+ put("captured", "onScriptLoadedCapture");
+ }});
+ map.put("onScriptLoaded", bubblingMap);
+ return map;
+ }
+}
+```
+
+
+
+
+```kotlin title="Demo/android/src/main/java/com/webview/ReactWebViewManager.kt"
+package com.webview
+
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.module.annotations.ReactModule;
+import com.facebook.react.uimanager.SimpleViewManager;
+import com.facebook.react.uimanager.ThemedReactContext;
+import com.facebook.react.uimanager.ViewManagerDelegate;
+import com.facebook.react.uimanager.annotations.ReactProp;
+import com.facebook.react.viewmanagers.CustomWebViewManagerInterface;
+import com.facebook.react.viewmanagers.CustomWebViewManagerDelegate;
+
+@ReactModule(name = ReactWebViewManager.REACT_CLASS)
+class ReactWebViewManager(context: ReactApplicationContext) : SimpleViewManager(), CustomWebViewManagerInterface {
+ private val delegate: CustomWebViewManagerDelegate =
+ CustomWebViewManagerDelegate(this)
+
+ override fun getDelegate(): ViewManagerDelegate = delegate
+
+ override fun getName(): String = REACT_CLASS
+
+ override fun createViewInstance(context: ThemedReactContext): ReactWebView = ReactWebView(context)
+
+ @ReactProp(name = "sourceUrl")
+ override fun setSourceURL(view: ReactWebView, sourceURL: String?) {
+ if (sourceURL == null) {
+ view.emitOnScriptLoaded(ReactWebView.OnScriptLoadedEventResult.error)
+ return;
+ }
+ view.loadUrl(sourceURL, emptyMap())
+ }
+
+ companion object {
+ const val REACT_CLASS = "CustomWebView"
+ }
+
+ override fun getExportedCustomBubblingEventTypeConstants(): Map =
+ mapOf(
+ "onScriptLoaded" to
+ mapOf(
+ "phasedRegistrationNames" to
+ mapOf(
+ "bubbled" to "onScriptLoaded",
+ "captured" to "onScriptLoadedCapture"
+ )))
+}
+```
+
+
+
+
+The `ReactWebViewManager` extends the `SimpleViewManager` class from React and implements the `CustomWebViewManagerInterface`, generated by Codegen.
+
+It holds a reference of the `CustomWebViewManagerDelegate`, another element generated by Codegen.
+
+It then overrides the `getName` function, which must return the same name used in the spec's `codegenNativeComponent` function call.
+
+The `createViewInstance` function is responsible to instantiate a new `ReactWebView`.
+
+Then, the ViewManager needs to define how all the React's components props will update the native view. In the example, you need to decide how to handle the `sourceURL` property that React will set on the `WebView`.
+
+Finally, if the component can emit an event, you need to map the event name by overriding the `getExportedCustomBubblingEventTypeConstants` for bubbling events, or the `getExportedCustomDirectEventTypeConstants` for direct events.
+
+### 4. Write the `ReactWebViewPackage`
+
+As you do with Native Modules, Native Components also need to implement the `ReactPackage` class. This is an object that you can use to register the component in the React Native runtime.
+
+This is the code for the `ReactWebViewPackage`:
+
+
+
+
+```java title="Demo/android/src/main/java/com/webview/ReactWebViewPackage.java"
+package com.webview;
+
+import com.facebook.react.BaseReactPackage;
+import com.facebook.react.bridge.NativeModule;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.module.model.ReactModuleInfo;
+import com.facebook.react.module.model.ReactModuleInfoProvider;
+import com.facebook.react.uimanager.ViewManager;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ReactWebViewPackage extends BaseReactPackage {
+ @Override
+ public List> createViewManagers(ReactApplicationContext reactContext) {
+ return Collections.singletonList(new ReactWebViewManager(reactContext));
+ }
+
+ @Override
+ public NativeModule getModule(String s, ReactApplicationContext reactApplicationContext) {
+ if (ReactWebViewManager.REACT_CLASS.equals(s)) {
+ return new ReactWebViewManager(reactApplicationContext);
+ }
+ return null;
+ }
+
+ @Override
+ public ReactModuleInfoProvider getReactModuleInfoProvider() {
+ return new ReactModuleInfoProvider() {
+ @Override
+ public Map getReactModuleInfos() {
+ Map map = new HashMap<>();
+ map.put(ReactWebViewManager.REACT_CLASS, new ReactModuleInfo(
+ ReactWebViewManager.REACT_CLASS, // name
+ ReactWebViewManager.REACT_CLASS, // className
+ false, // canOverrideExistingModule
+ false, // needsEagerInit
+ false, // isCxxModule
+ true // isTurboModule
+ ));
+ return map;
+ }
+ };
+ }
+}
+```
+
+
+
+
+```kotlin title="Demo/android/src/main/java/com/webview/ReactWebViewPackage.kt"
+package com.webview
+
+import com.facebook.react.BaseReactPackage
+import com.facebook.react.bridge.NativeModule
+import com.facebook.react.bridge.ReactApplicationContext
+import com.facebook.react.module.model.ReactModuleInfo
+import com.facebook.react.module.model.ReactModuleInfoProvider
+import com.facebook.react.uimanager.ViewManager
+
+class ReactWebViewPackage : BaseReactPackage() {
+ override fun createViewManagers(reactContext: ReactApplicationContext): List> {
+ return listOf(ReactWebViewManager(reactContext))
+ }
+
+ override fun getModule(s: String, reactApplicationContext: ReactApplicationContext): NativeModule? {
+ when (s) {
+ ReactWebViewManager.REACT_CLASS -> ReactWebViewManager(reactApplicationContext)
+ }
+ return null
+ }
+
+ override fun getReactModuleInfoProvider(): ReactModuleInfoProvider = ReactModuleInfoProvider {
+ mapOf(ReactWebViewManager.REACT_CLASS to ReactModuleInfo(
+ name = ReactWebViewManager.REACT_CLASS,
+ className = ReactWebViewManager.REACT_CLASS,
+ canOverrideExistingModule = false,
+ needsEagerInit = false,
+ isCxxModule = false,
+ isTurboModule = true,
+ )
+ )
+ }
+}
+```
+
+
+
+
+The `ReactWebViewPackage` extends the `BaseReactPackage` and implements all the methods required to properly register our component.
+
+- the `createViewManagers` method is the factory method that creates the `ViewManager` that manage the custom views.
+- the `getModule` method returns the proper ViewManager depending on the View that React Native needs to render.
+- the `getReactModuleInfoProvider` provides all the information required when registering the module in the runtime,
+
+### 5. Register the `ReactWebViewPackage` in the application
+
+Finally, you need to register the `ReactWebViewPackage` in the application. We do that by modifying the `MainApplication` file by adding the `ReactWebViewPackage` to the list of packages returned by the `getPackages` function.
+
+```kotlin title="Demo/app/src/main/java/com/demo/MainApplication.kt"
+package com.demo
+
+import android.app.Application
+import com.facebook.react.PackageList
+import com.facebook.react.ReactApplication
+import com.facebook.react.ReactHost
+import com.facebook.react.ReactNativeHost
+import com.facebook.react.ReactPackage
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
+import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
+import com.facebook.react.defaults.DefaultReactNativeHost
+import com.facebook.react.soloader.OpenSourceMergedSoMapping
+import com.facebook.soloader.SoLoader
+// highlight-next-line
+import com.webview.ReactWebViewPackage
+
+class MainApplication : Application(), ReactApplication {
+
+ override val reactNativeHost: ReactNativeHost =
+ object : DefaultReactNativeHost(this) {
+ override fun getPackages(): List =
+ PackageList(this).packages.apply {
+ // highlight-next-line
+ add(ReactWebViewPackage())
+ }
+
+ override fun getJSMainModuleName(): String = "index"
+
+ override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
+
+ override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
+ override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
+ }
+
+ override val reactHost: ReactHost
+ get() = getDefaultReactHost(applicationContext, reactNativeHost)
+
+ override fun onCreate() {
+ super.onCreate()
+ SoLoader.init(this, OpenSourceMergedSoMapping)
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
+ load()
+ }
+ }
+}
+
+```
diff --git a/website/versioned_docs/version-0.86/fabric-native-components-ios.md b/website/versioned_docs/version-0.86/fabric-native-components-ios.md
new file mode 100644
index 00000000000..baad9bdb6d2
--- /dev/null
+++ b/website/versioned_docs/version-0.86/fabric-native-components-ios.md
@@ -0,0 +1,222 @@
+---
+id: fabric-native-components-ios
+title: 'Fabric Native Components: iOS'
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Now it's time to write some iOS platform code to be able to render the web view. The steps you need to follow are:
+
+- Run Codegen.
+- Write the code for the `RCTWebView`
+- Register the `RCTWebView` in the application
+
+### 1. Run Codegen
+
+You can [manually run](the-new-architecture/codegen-cli) the Codegen, however it's simpler to use the application you're going to demo the component in to do this for you.
+
+```bash
+cd ios
+bundle install
+bundle exec pod install
+```
+
+Importantly you will see logging output from Codegen, which we're going to use in Xcode to build our WebView native component.
+
+:::warning
+You should be careful about committing generated code to your repository. Generated code is specific to each version of React Native. Use npm [peerDependencies](https://nodejs.org/en/blog/npm/peer-dependencies) to restrict compatibility with version of React Native.
+:::
+
+### 3. Write the `RCTWebView`
+
+We need to prepare your iOS project using Xcode by completing these **5 steps**:
+
+1. Open the CocoaPods generated Xcode Workspace:
+
+```bash
+cd ios
+open Demo.xcworkspace
+```
+
+
+
+2. Right click on app and select New Group, call the new group `WebView`.
+
+
+
+3. In the `WebView` group, create New→File from Template.
+
+
+
+4. Use the Objective-C File template, and name it RCTWebView.
+
+
+
+5. Repeat step 4 and create a header file named `RCTWebView.h`.
+
+6. Rename RCTWebView.m → RCTWebView.mm making it an Objective-C++ file.
+
+```text title="Demo/ios"
+Podfile
+...
+Demo
+├── AppDelegate.swift
+...
+// highlight-start
+├── RCTWebView.h
+└── RCTWebView.mm
+// highlight-end
+```
+
+After creating the header file and the implementation file, you can start implementing them.
+
+This is the code for the `RCTWebView.h` file, which declares the component interface.
+
+```objc title="Demo/RCTWebView/RCTWebView.h"
+#import
+#import
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface RCTWebView : RCTViewComponentView
+
+// You would declare native methods you'd want to access from the view here
+
+@end
+
+NS_ASSUME_NONNULL_END
+```
+
+This class defines an `RCTWebView` which extends the `RCTViewComponentView` class. This is the base class for all the native components and it is provided by React Native.
+
+The code for the implementation file (`RCTWebView.mm`) is the following:
+
+```objc title="Demo/RCTWebView/RCTWebView.mm"
+#import "RCTWebView.h"
+
+#import
+#import
+#import
+#import
+// highlight-next-line
+#import
+
+using namespace facebook::react;
+
+@interface RCTWebView ()
+@end
+
+@implementation RCTWebView {
+ NSURL * _sourceURL;
+ WKWebView * _webView;
+}
+
+-(instancetype)init
+{
+ if(self = [super init]) {
+ // highlight-start
+ _webView = [WKWebView new];
+ _webView.navigationDelegate = self;
+ [self addSubview:_webView];
+ // highlight-end
+ }
+ return self;
+}
+
+- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
+{
+ const auto &oldViewProps = *std::static_pointer_cast(_props);
+ const auto &newViewProps = *std::static_pointer_cast(props);
+
+ // Handle your props here
+ if (oldViewProps.sourceURL != newViewProps.sourceURL) {
+ NSString *urlString = [NSString stringWithCString:newViewProps.sourceURL.c_str() encoding:NSUTF8StringEncoding];
+ _sourceURL = [NSURL URLWithString:urlString];
+ // highlight-start
+ if ([self urlIsValid:newViewProps.sourceURL]) {
+ [_webView loadRequest:[NSURLRequest requestWithURL:_sourceURL]];
+ }
+ // highlight-end
+ }
+
+ [super updateProps:props oldProps:oldProps];
+}
+
+-(void)layoutSubviews
+{
+ [super layoutSubviews];
+ _webView.frame = self.bounds;
+
+}
+
+#pragma mark - WKNavigationDelegate
+
+// highlight-start
+-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
+{
+ CustomWebViewEventEmitter::OnScriptLoaded result = CustomWebViewEventEmitter::OnScriptLoaded{CustomWebViewEventEmitter::OnScriptLoadedResult::Success};
+ self.eventEmitter.onScriptLoaded(result);
+}
+
+- (BOOL)urlIsValid:(std::string)propString
+{
+ if (propString.length() > 0 && !_sourceURL) {
+ CustomWebViewEventEmitter::OnScriptLoaded result = CustomWebViewEventEmitter::OnScriptLoaded{CustomWebViewEventEmitter::OnScriptLoadedResult::Error};
+
+ self.eventEmitter.onScriptLoaded(result);
+ return NO;
+ }
+ return YES;
+}
+
+// Event emitter convenience method
+- (const CustomWebViewEventEmitter &)eventEmitter
+{
+ return static_cast(*_eventEmitter);
+}
+// highlight-end
+
++ (ComponentDescriptorProvider)componentDescriptorProvider
+{
+ return concreteComponentDescriptorProvider();
+}
+
+@end
+```
+
+This code is written in Objective-C++ and contains various details:
+
+- the `@interface` implements two protocols:
+ - `RCTCustomWebViewViewProtocol`, generated by Codegen;
+ - `WKNavigationDelegate`, provided by the WebKit framework to handle the web view navigation events;
+- the `init` method that instantiates the `WKWebView`, adds it to the subviews and that sets the `navigationDelegate`;
+- the `updateProps` method that is called by React Native when the component's props change;
+- the `layoutSubviews` method that describes how the custom view needs to be laid out;
+- the `webView:didFinishNavigation:` method that lets you handle what to do when the `WKWebView` finishes loading the page;
+- the `urlIsValid:(std::string)propString` method that checks whether the URL received as prop is valid;
+- the `eventEmitter` method which is a utility to retrieve a strongly typed `eventEmitter` instance
+- the `componentDescriptorProvider` which returns the `ComponentDescriptor` generated by Codegen;
+
+#### Add WebKit framework
+
+:::note
+This step is only required because we are creating a Web view. Web components on iOS needs to be linked against the WebKit framework provided by Apple. If your component doesn't need to access web-specific features, you can skip this step.
+:::
+
+A web view requires access to some features that Apple provides through one of the frameworks shipped with Xcode and the devices: WebKit.
+You can see it in the native code by the `#import ` line added in the `RCTWebView.mm`.
+
+To link the WebKit framework in your app, follow these steps:
+
+1. In Xcode, Click on your project
+2. Select the app target
+3. Select the General tab
+4. Scroll down until you find the _"Frameworks, Libraries, and Embedded Contents"_ section, and press the `+` button
+
+
+
+5. In the search bar, filter for WebKit
+6. Select the WebKit framework
+7. Click on Add.
+
+
diff --git a/website/versioned_docs/version-0.86/fabric-native-components.md b/website/versioned_docs/version-0.86/fabric-native-components.md
new file mode 100644
index 00000000000..2a509a7174e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/fabric-native-components.md
@@ -0,0 +1,229 @@
+---
+id: fabric-native-components-introduction
+title: Fabric Native Components Introduction
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import constants from '@site/core/TabsConstants';
+import {FabricNativeComponentsAndroid,FabricNativeComponentsIOS} from './\_fabric-native-components';
+
+# Native Components
+
+If you want to build _new_ React Native Components that wrap around a [Host Component](https://reactnative.dev/architecture/glossary#host-view-tree-and-host-view) like a unique kind of [CheckBox](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckBox) on Android, or a [UIButton](https://developer.apple.com/documentation/uikit/uibutton?language=objc) on iOS, you should use a Fabric Native Component.
+
+This guide will show you how to build Fabric Native Components, by implementing a web view component. The steps to doing this are:
+
+1. Define a JavaScript specification using Flow or TypeScript.
+2. Configure the dependencies management system to generate code from the provided spec and to be auto-linked.
+3. Implement the Native code.
+4. Use the Component in an App.
+
+You're going to need a plain template generated application to use the component:
+
+```bash
+npx @react-native-community/cli@latest init Demo --install-pods false
+```
+
+## Creating a WebView Component
+
+This guide will show you how to create a Web View component. We will be creating the component by using the Android's [`WebView`](https://developer.android.com/reference/android/webkit/WebView) component, and the iOS [`WKWebView`](https://developer.apple.com/documentation/webkit/wkwebview?language=objc) component.
+
+Let's start by creating the folders structure to hold our component's code:
+
+```bash
+mkdir -p Demo/{specs,android/app/src/main/java/com/webview}
+```
+
+This gives you the following layout where you'll working:
+
+```
+Demo
+├── android/app/src/main/java/com/webview
+└── ios
+└── specs
+```
+
+- The `android/app/src/main/java/com/webview` folder is the folder that will contain our Android code.
+- The `ios` folder is the folder that will contain our iOS code.
+- The `specs` folder is the folder that will contain the Codegen's specification file.
+
+## 1. Define Specification for Codegen
+
+Your specification must be defined in either [TypeScript](https://www.typescriptlang.org/) or [Flow](https://flow.org/) (see [Codegen](the-new-architecture/what-is-codegen) documentation for more details). This is used by Codegen to generate the C++, Objective-C++ and Java to connect your platform code to the JavaScript runtime that React runs in.
+
+The specification file must be named `NativeComponent.{ts|js}` to work with Codegen. The suffix `NativeComponent` is not only a convention, it is actually used by Codegen to detect a spec file.
+
+Use this specification for our WebView Component:
+
+
+
+
+```typescript title="Demo/specs/WebViewNativeComponent.ts"
+import type {
+ CodegenTypes,
+ HostComponent,
+ ViewProps,
+} from 'react-native';
+import {codegenNativeComponent} from 'react-native';
+
+type WebViewScriptLoadedEvent = {
+ result: 'success' | 'error';
+};
+
+export interface NativeProps extends ViewProps {
+ sourceURL?: string;
+ onScriptLoaded?: CodegenTypes.BubblingEventHandler | null;
+}
+
+export default codegenNativeComponent(
+ 'CustomWebView',
+) as HostComponent;
+```
+
+
+
+
+```ts title="Demo/RCTWebView/js/RCTWebViewNativeComponent.js":
+// @flow strict-local
+
+import type {CodegenTypes, HostComponent, ViewProps} from 'react-native';
+import {codegenNativeComponent} from 'react-native';
+
+type WebViewScriptLoadedEvent = $ReadOnly<{|
+ result: "success" | "error",
+|}>;
+
+type NativeProps = $ReadOnly<{|
+ ...ViewProps,
+ sourceURL?: string;
+ onScriptLoaded?: CodegenTypes.BubblingEventHandler?;
+|}>;
+
+export default (codegenNativeComponent(
+ 'CustomWebView',
+): HostComponent);
+
+```
+
+
+
+
+This specification is composed of three main parts, excluding the imports:
+
+- The `WebViewScriptLoadedEvent` is a supporting data type for the data the event needs to pass from native to JavaScript.
+- The `NativeProps` is a definition of the props that we can set on the component.
+- The `codegenNativeComponent` statement allows us to codegenerate the code for the custom component and that defines a name for the component used to match the native implementations.
+
+As with Native Modules, you can have multiple specification files in the `specs/` directory. For more information about the types you can use, and the platform types these map to, see the [appendix](appendix.md#codegen-typings).
+
+## 2. Configure Codegen to run
+
+The specification is used by the React Native's Codegen tools to generate platform specific interfaces and boilerplate for us. To do this, Codegen needs to know where to find our specification and what to do with it. Update your `package.json` to include:
+
+```json package.json
+ "start": "react-native start",
+ "test": "jest"
+ },
+ // highlight-start
+ "codegenConfig": {
+ "name": "AppSpec",
+ "type": "components",
+ "jsSrcsDir": "specs",
+ "android": {
+ "javaPackageName": "com.webview"
+ },
+ "ios": {
+ "componentProvider": {
+ "CustomWebView": "RCTWebView"
+ }
+ }
+ },
+ // highlight-end
+ "dependencies": {
+```
+
+With everything wired up for Codegen, we need to prepare our native code to hook into our generated code.
+
+Note that for iOS, we are declaratively mapping the name of the JS component that is exported by the spec (`CustomWebView`) with the iOS class that will implement the component natively.
+
+## 2. Building your Native Code
+
+Now it's time to write the native platform code so that when React requires to render a view, the platform can create the right native view and can render it on screen.
+
+You should work through both the Android and iOS platforms.
+
+:::note
+This guide shows you how to create a Native Component that only works with the New Architecture. If you need to support both the New Architecture and the Legacy Architecture, please refer to our [backwards compatibility guide](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/backwards-compat.md).
+
+:::
+
+
+
+
+
+
+
+
+
+
+## 3. Use your Native Component
+
+Finally, you can use the new component in your app. Update your generated `App.tsx` to:
+
+```javascript title="Demo/App.tsx"
+import React from 'react';
+import {Alert, StyleSheet, View} from 'react-native';
+import WebView from './specs/WebViewNativeComponent';
+
+function App(): React.JSX.Element {
+ return (
+
+ {
+ Alert.alert('Page Loaded');
+ }}
+ />
+
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ alignContent: 'center',
+ },
+ webview: {
+ width: '100%',
+ height: '100%',
+ },
+});
+
+export default App;
+```
+
+This code creates an app that uses the new `WebView` component we created to load the `react.dev` website.
+
+The app also shows an alert when the web page is loaded.
+
+## 4. Run your App using the WebView Component
+
+
+
+```bash
+yarn run android
+```
+
+
+```bash
+yarn run ios
+```
+
+
+
+| Android | iOS |
+| :-------------------------------------------------------------------------------: | :--------------------------------------------------------------------------: |
+| | |
diff --git a/website/versioned_docs/version-0.86/fast-refresh.md b/website/versioned_docs/version-0.86/fast-refresh.md
new file mode 100644
index 00000000000..89010b75065
--- /dev/null
+++ b/website/versioned_docs/version-0.86/fast-refresh.md
@@ -0,0 +1,47 @@
+---
+id: fast-refresh
+title: Fast Refresh
+---
+
+Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components. Fast Refresh is enabled by default, and you can toggle "Enable Fast Refresh" in the [React Native Dev Menu](/docs/debugging#accessing-the-in-app-developer-menu). With Fast Refresh enabled, most edits should be visible within a second or two.
+
+## How It Works
+
+- If you edit a module that **only exports React component(s)**, Fast Refresh will update the code only for that module, and re-render your component. You can edit anything in that file, including styles, rendering logic, event handlers, or effects.
+- If you edit a module with exports that _aren't_ React components, Fast Refresh will re-run both that module, and the other modules importing it. So if both `Button.js` and `Modal.js` import `Theme.js`, editing `Theme.js` will update both components.
+- Finally, if you **edit a file** that's **imported by modules outside of the React tree**, Fast Refresh **will fall back to doing a full reload**. You might have a file which renders a React component but also exports a value that is imported by a **non-React component**. For example, maybe your component also exports a constant, and a non-React utility module imports it. In that case, consider migrating the constant to a separate file and importing it into both files. This will re-enable Fast Refresh to work. Other cases can usually be solved in a similar way.
+
+## Error Resilience
+
+If you make a **syntax error** during a Fast Refresh session, you can fix it and save the file again. The redbox will disappear. Modules with syntax errors are prevented from running, so you won't need to reload the app.
+
+If you make a **runtime error during the module initialization** (for example, typing `Style.create` instead of `StyleSheet.create`), the Fast Refresh session will continue once you fix the error. The redbox will disappear, and the module will be updated.
+
+If you make a mistake that leads to a **runtime error inside your component**, the Fast Refresh session will _also_ continue after you fix the error. In that case, React will remount your application using the updated code.
+
+If you have [error boundaries](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) in your app (which is a good idea for graceful failures in production), they will retry rendering on the next edit after a redbox. In that sense, having an error boundary can prevent you from always getting kicked out to the root app screen. However, keep in mind that error boundaries shouldn't be _too_ granular. They are used by React in production, and should always be designed intentionally.
+
+## Limitations
+
+Fast Refresh tries to preserve local React state in the component you're editing, but only if it's safe to do so. Here's a few reasons why you might see local state being reset on every edit to a file:
+
+- Local state is not preserved for class components (only function components and Hooks preserve state).
+- The module you're editing might have _other_ exports in addition to a React component.
+- Sometimes, a module would export the result of calling higher-order component like `createNavigationContainer(MyScreen)`. If the returned component is a class, state will be reset.
+
+In the longer term, as more of your codebase moves to function components and Hooks, you can expect state to be preserved in more cases.
+
+## Tips
+
+- Fast Refresh preserves React local state in function components (and Hooks) by default.
+- Sometimes you might want to _force_ the state to be reset, and a component to be remounted. For example, this can be handy if you're tweaking an animation that only happens on mount. To do this, you can add `// @refresh reset` anywhere in the file you're editing. This directive is local to the file, and instructs Fast Refresh to remount components defined in that file on every edit.
+
+## Fast Refresh and Hooks
+
+When possible, Fast Refresh attempts to preserve the state of your component between edits. In particular, `useState` and `useRef` preserve their previous values as long as you don't change their arguments or the order of the Hook calls.
+
+Hooks with dependencies—such as `useEffect`, `useMemo`, and `useCallback`—will _always_ update during Fast Refresh. Their list of dependencies will be ignored while Fast Refresh is happening.
+
+For example, when you edit `useMemo(() => x * 2, [x])` to `useMemo(() => x * 10, [x])`, it will re-run even though `x` (the dependency) has not changed. If React didn't do that, your edit wouldn't reflect on the screen!
+
+Sometimes, this can lead to unexpected results. For example, even a `useEffect` with an empty array of dependencies would still re-run once during Fast Refresh. However, writing code resilient to an occasional re-running of `useEffect` is a good practice even without Fast Refresh. This makes it easier for you to later introduce new dependencies to it.
diff --git a/website/versioned_docs/version-0.86/flatlist.md b/website/versioned_docs/version-0.86/flatlist.md
new file mode 100644
index 00000000000..56505e27ca8
--- /dev/null
+++ b/website/versioned_docs/version-0.86/flatlist.md
@@ -0,0 +1,861 @@
+---
+id: flatlist
+title: FlatList
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+A performant interface for rendering basic, flat lists, supporting the most handy features:
+
+- Fully cross-platform.
+- Optional horizontal mode.
+- Configurable viewability callbacks.
+- Header support.
+- Footer support.
+- Separator support.
+- Pull to Refresh.
+- Scroll loading.
+- ScrollToIndex support.
+- Multiple column support.
+
+If you need section support, use [``](sectionlist.md).
+
+## Example
+
+
+
+
+```SnackPlayer name=Simple%20FlatList%20Example&ext=js
+import React from 'react';
+import {View, FlatList, StyleSheet, Text, StatusBar} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DATA = [
+ {
+ id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba',
+ title: 'First Item',
+ },
+ {
+ id: '3ac68afc-c605-48d3-a4f8-fbd91aa97f63',
+ title: 'Second Item',
+ },
+ {
+ id: '58694a0f-3da1-471f-bd96-145571e29d72',
+ title: 'Third Item',
+ },
+];
+
+const Item = ({title}) => (
+
+ {title}
+
+);
+
+const App = () => (
+
+
+ }
+ keyExtractor={item => item.id}
+ />
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: StatusBar.currentHeight || 0,
+ },
+ item: {
+ backgroundColor: '#f9c2ff',
+ padding: 20,
+ marginVertical: 8,
+ marginHorizontal: 16,
+ },
+ title: {
+ fontSize: 32,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Simple%20FlatList%20Example&ext=tsx
+import React from 'react';
+import {View, FlatList, StyleSheet, Text, StatusBar} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DATA = [
+ {
+ id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba',
+ title: 'First Item',
+ },
+ {
+ id: '3ac68afc-c605-48d3-a4f8-fbd91aa97f63',
+ title: 'Second Item',
+ },
+ {
+ id: '58694a0f-3da1-471f-bd96-145571e29d72',
+ title: 'Third Item',
+ },
+];
+
+type ItemProps = {title: string};
+
+const Item = ({title}: ItemProps) => (
+
+ {title}
+
+);
+
+const App = () => (
+
+
+ }
+ keyExtractor={item => item.id}
+ />
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: StatusBar.currentHeight || 0,
+ },
+ item: {
+ backgroundColor: '#f9c2ff',
+ padding: 20,
+ marginVertical: 8,
+ marginHorizontal: 16,
+ },
+ title: {
+ fontSize: 32,
+ },
+});
+
+export default App;
+```
+
+
+
+
+To render multiple columns, use the [`numColumns`](flatlist.md#numcolumns) prop. Using this approach instead of a `flexWrap` layout can prevent conflicts with the item height logic.
+
+More complex, selectable example below.
+
+- By passing `extraData={selectedId}` to `FlatList` we make sure `FlatList` itself will re-render when the state changes. Without setting this prop, `FlatList` would not know it needs to re-render any items because it is a `PureComponent` and the prop comparison will not show any changes.
+- `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.
+
+
+
+
+```SnackPlayer name=flatlist-selectable&ext=js
+import React, {useState} from 'react';
+import {
+ FlatList,
+ StatusBar,
+ StyleSheet,
+ Text,
+ TouchableOpacity,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DATA = [
+ {
+ id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba',
+ title: 'First Item',
+ },
+ {
+ id: '3ac68afc-c605-48d3-a4f8-fbd91aa97f63',
+ title: 'Second Item',
+ },
+ {
+ id: '58694a0f-3da1-471f-bd96-145571e29d72',
+ title: 'Third Item',
+ },
+];
+
+const Item = ({item, onPress, backgroundColor, textColor}) => (
+
+ {item.title}
+
+);
+
+const App = () => {
+ const [selectedId, setSelectedId] = useState();
+
+ const renderItem = ({item}) => {
+ const backgroundColor = item.id === selectedId ? '#6e3b6e' : '#f9c2ff';
+ const color = item.id === selectedId ? 'white' : 'black';
+
+ return (
+ setSelectedId(item.id)}
+ backgroundColor={backgroundColor}
+ textColor={color}
+ />
+ );
+ };
+
+ return (
+
+
+ item.id}
+ extraData={selectedId}
+ />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: StatusBar.currentHeight || 0,
+ },
+ item: {
+ padding: 20,
+ marginVertical: 8,
+ marginHorizontal: 16,
+ },
+ title: {
+ fontSize: 32,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=flatlist-selectable&ext=tsx
+import React, {useState} from 'react';
+import {
+ FlatList,
+ StatusBar,
+ StyleSheet,
+ Text,
+ TouchableOpacity,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+type ItemData = {
+ id: string;
+ title: string;
+};
+
+const DATA: ItemData[] = [
+ {
+ id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba',
+ title: 'First Item',
+ },
+ {
+ id: '3ac68afc-c605-48d3-a4f8-fbd91aa97f63',
+ title: 'Second Item',
+ },
+ {
+ id: '58694a0f-3da1-471f-bd96-145571e29d72',
+ title: 'Third Item',
+ },
+];
+
+type ItemProps = {
+ item: ItemData;
+ onPress: () => void;
+ backgroundColor: string;
+ textColor: string;
+};
+
+const Item = ({item, onPress, backgroundColor, textColor}: ItemProps) => (
+
+ {item.title}
+
+);
+
+const App = () => {
+ const [selectedId, setSelectedId] = useState();
+
+ const renderItem = ({item}: {item: ItemData}) => {
+ const backgroundColor = item.id === selectedId ? '#6e3b6e' : '#f9c2ff';
+ const color = item.id === selectedId ? 'white' : 'black';
+
+ return (
+ setSelectedId(item.id)}
+ backgroundColor={backgroundColor}
+ textColor={color}
+ />
+ );
+ };
+
+ return (
+
+
+ item.id}
+ extraData={selectedId}
+ />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: StatusBar.currentHeight || 0,
+ },
+ item: {
+ padding: 20,
+ marginVertical: 8,
+ marginHorizontal: 16,
+ },
+ title: {
+ fontSize: 32,
+ },
+});
+
+export default App;
+```
+
+
+
+
+This is a convenience wrapper around [``](virtualizedlist.md), and thus inherits its props (as well as those of [``](scrollview.md)) that aren't explicitly listed here, along with the following caveats:
+
+- Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay.
+- This is a `PureComponent` which means that it will not re-render if `props` remain shallow-equal. Make sure that everything your `renderItem` function depends on is passed as a prop (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on changes. This includes the `data` prop and parent component state.
+- In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes.
+- By default, the list looks for a `key` prop on each item and uses that for the React key. Alternatively, you can provide a custom `keyExtractor` prop.
+
+---
+
+# Reference
+
+## Props
+
+### [VirtualizedList Props](virtualizedlist.md#props)
+
+Inherits [VirtualizedList Props](virtualizedlist.md#props).
+
+---
+
+###
Required
**`renderItem`**
+
+```tsx
+renderItem({
+ item: ItemT,
+ index: number,
+ separators: {
+ highlight: () => void;
+ unhighlight: () => void;
+ updateProps: (select: 'leading' | 'trailing', newProps: any) => void;
+ }
+}): JSX.Element;
+```
+
+Takes an item from `data` and renders it into the list.
+
+Provides additional metadata like `index` if you need it, as well as a more generic `separators.updateProps` function which let you set whatever props you want to change the rendering of either the leading separator or trailing separator in case the more common `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for your use case.
+
+| Type |
+| -------- |
+| function |
+
+- `item` (Object): The item from `data` being rendered.
+- `index` (number): The index corresponding to this item in the `data` array.
+- `separators` (Object)
+ - `highlight` (Function)
+ - `unhighlight` (Function)
+ - `updateProps` (Function)
+ - `select` (enum('leading', 'trailing'))
+ - `newProps` (Object)
+
+Example usage:
+
+```tsx
+ (
+
+ ))
+ }
+ data={[{title: 'Title Text', key: 'item1'}]}
+ renderItem={({item, index, separators}) => (
+ this._onPress(item)}
+ onShowUnderlay={separators.highlight}
+ onHideUnderlay={separators.unhighlight}>
+
+ {item.title}
+
+
+ )}
+/>
+```
+
+---
+
+###
Required
**`data`**
+
+An array (or array-like list) of items to render. Other data types can be used by targeting [`VirtualizedList`](virtualizedlist.md) directly.
+
+| Type |
+| --------- |
+| ArrayLike |
+
+---
+
+### `ItemSeparatorComponent`
+
+Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ---------------------------- |
+| component, function, element |
+
+---
+
+### `ListEmptyComponent`
+
+Rendered when the list is empty. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `ListFooterComponent`
+
+Rendered at the bottom of all the items. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `ListFooterComponentStyle`
+
+Styling for internal View for `ListFooterComponent`.
+
+| Type |
+| ------------------------------ |
+| [View Style](view-style-props) |
+
+---
+
+### `ListHeaderComponent`
+
+Rendered at the top of all the items. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `ListHeaderComponentStyle`
+
+Styling for internal View for `ListHeaderComponent`.
+
+| Type |
+| ------------------------------ |
+| [View Style](view-style-props) |
+
+---
+
+### `columnWrapperStyle`
+
+Optional custom style for multi-item rows generated when `numColumns > 1`.
+
+| Type |
+| ------------------------------ |
+| [View Style](view-style-props) |
+
+---
+
+### `extraData`
+
+A marker property for telling the list to re-render (since it implements `PureComponent`). If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop, stick it here and treat it immutably.
+
+| Type |
+| ---- |
+| any |
+
+---
+
+### `getItemLayout`
+
+```tsx
+(data, index) => {length: number, offset: number, index: number}
+```
+
+`getItemLayout` is an optional optimization that allows skipping the measurement of dynamic content if you know the size (height or width) of items ahead of time. `getItemLayout` is efficient if you have fixed size items, for example:
+
+```tsx
+ getItemLayout={(data, index) => (
+ {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index}
+ )}
+```
+
+Adding `getItemLayout` can be a great performance boost for lists of several hundred items. Remember to include separator length (height or width) in your offset calculation if you specify `ItemSeparatorComponent`.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `horizontal`
+
+If `true`, renders items next to each other horizontally instead of stacked vertically.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `initialNumToRender`
+
+How many items to render in the initial batch. This should be enough to fill the screen but not much more. Note these items will never be unmounted as part of the windowed rendering in order to improve perceived performance of scroll-to-top actions.
+
+| Type | Default |
+| ------ | ------- |
+| number | `10` |
+
+---
+
+### `initialScrollIndex`
+
+Instead of starting at the top with the first item, start at `initialScrollIndex`. This disables the "scroll to top" optimization that keeps the first `initialNumToRender` items always rendered and immediately renders the items starting at this initial index. Requires `getItemLayout` to be implemented.
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `inverted`
+
+Reverses the direction of scroll. Uses scale transforms of `-1`.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `keyExtractor`
+
+```tsx
+(item: ItemT, index: number) => string;
+```
+
+Used to extract a unique key for a given item at the specified index. Key is used for caching and as the react key to track item re-ordering. The default extractor checks `item.key`, then `item.id`, and then falls back to using the index, like React does.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `numColumns`
+
+Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a `flexWrap` layout. Items should all be the same height - masonry layouts are not supported.
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `onRefresh`
+
+```tsx
+() => void;
+```
+
+If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the `refreshing` prop correctly.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onViewableItemsChanged`
+
+Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
+
+| Type |
+| ----------------------------------------------------------------------------------------------------- |
+| `md (callback: {changed: [ViewToken](viewtoken)[], viewableItems: [ViewToken](viewtoken)[]} => void;` |
+
+---
+
+### `progressViewOffset`
+
+Set this when offset is needed for the loading indicator to show correctly.
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `refreshing`
+
+Set this true while waiting for new data from a refresh.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `removeClippedSubviews`
+
+:::warning
+Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
+:::
+
+When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `viewabilityConfig`
+
+See [`ViewabilityHelper.js`](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Lists/ViewabilityHelper.js) for flow type and further documentation.
+
+| Type |
+| ----------------- |
+| ViewabilityConfig |
+
+`viewabilityConfig` takes a type `ViewabilityConfig` an object with following properties
+
+| Property | Type |
+| -------------------------------- | ------- |
+| minimumViewTime | number |
+| viewAreaCoveragePercentThreshold | number |
+| itemVisiblePercentThreshold | number |
+| waitForInteraction | boolean |
+
+At least one of the `viewAreaCoveragePercentThreshold` or `itemVisiblePercentThreshold` is required. This needs to be done in the `constructor` to avoid following error ([ref](https://github.com/facebook/react-native/issues/17408)):
+
+```
+ Error: Changing viewabilityConfig on the fly is not supported
+```
+
+```tsx
+constructor (props) {
+ super(props)
+
+ this.viewabilityConfig = {
+ waitForInteraction: true,
+ viewAreaCoveragePercentThreshold: 95
+ }
+}
+```
+
+```tsx
+;
+```
+
+Provides a reference to the underlying scroll component
+
+---
+
+### `getScrollResponder()`
+
+```tsx
+getScrollResponder(): ScrollResponderMixin;
+```
+
+Provides a handle to the underlying scroll responder.
+
+---
+
+### `getScrollableNode()`
+
+```tsx
+getScrollableNode(): any;
+```
+
+Provides a handle to the underlying scroll node.
+
+### `scrollToEnd()`
+
+```tsx
+scrollToEnd(params?: {animated?: boolean});
+```
+
+Scrolls to the end of the content. May be janky without `getItemLayout` prop.
+
+**Parameters:**
+
+| Name | Type |
+| ------ | ------ |
+| params | object |
+
+Valid `params` keys are:
+
+- 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+
+---
+
+### `scrollToIndex()`
+
+```tsx
+scrollToIndex: (params: {
+ index: number;
+ animated?: boolean;
+ viewOffset?: number;
+ viewPosition?: number;
+});
+```
+
+Scrolls to the item at the specified index such that it is positioned in the viewable area such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the middle.
+
+:::note
+Cannot scroll to locations outside the render window without specifying the `getItemLayout` prop.
+:::
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ------ |
+| params
Required
| object |
+
+Valid `params` keys are:
+
+- 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+- 'index' (number) - The index to scroll to. Required.
+- 'viewOffset' (number) - A fixed number of pixels to offset the final target position.
+- 'viewPosition' (number) - A value of `0` places the item specified by index at the top, `1` at the bottom, and `0.5` centered in the middle.
+
+---
+
+### `scrollToItem()`
+
+```tsx
+scrollToItem(params: {
+ animated?: ?boolean,
+ item: Item,
+ viewPosition?: number,
+});
+```
+
+Requires linear scan through data - use `scrollToIndex` instead if possible.
+
+:::note
+Cannot scroll to locations outside the render window without specifying the `getItemLayout` prop.
+:::
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ------ |
+| params
Required
| object |
+
+Valid `params` keys are:
+
+- 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+- 'item' (object) - The item to scroll to. Required.
+- 'viewPosition' (number)
+
+---
+
+### `scrollToOffset()`
+
+```tsx
+scrollToOffset(params: {
+ offset: number;
+ animated?: boolean;
+});
+```
+
+Scroll to a specific content pixel offset in the list.
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ------ |
+| params
Required
| object |
+
+Valid `params` keys are:
+
+- 'offset' (number) - The offset to scroll to. In case of `horizontal` being true, the offset is the x-value, in any other case the offset is the y-value. Required.
+- 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
diff --git a/website/versioned_docs/version-0.86/flexbox.md b/website/versioned_docs/version-0.86/flexbox.md
new file mode 100644
index 00000000000..039a7bdf60b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/flexbox.md
@@ -0,0 +1,2884 @@
+---
+id: flexbox
+title: Layout with Flexbox
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+A component can specify the layout of its children using the Flexbox algorithm. Flexbox is designed to provide a consistent layout on different screen sizes.
+
+You will normally use a combination of `flexDirection`, `alignItems`, and `justifyContent` to achieve the right layout.
+
+:::caution
+Flexbox works the same way in React Native as it does in CSS on the web, with a few exceptions.
+The defaults are different, with `flexDirection` defaulting to `column` instead of `row`, `alignContent` defaulting to `flex-start` instead of `stretch`, `flexShrink` defaulting to `0` instead of `1`, the `flex` parameter only supporting a single number.
+:::
+
+## Flex
+
+[`flex`](layout-props#flex) will define how your items are going to **“fill”** over the available space along your main axis. Space will be divided according to each element's flex property.
+
+In the following example, the red, orange, and green views are all children in the container view that has `flex: 1` set. The red view uses `flex: 1` , the orange view uses `flex: 2`, and the green view uses `flex: 3` . **1+2+3 = 6**, which means that the red view will get `1/6` of the space, the orange `2/6` of the space, and the green `3/6` of the space.
+
+```SnackPlayer name=Flex%20Example
+import React from 'react';
+import {StyleSheet, View} from 'react-native';
+
+const Flex = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ padding: 20,
+ },
+});
+
+export default Flex;
+```
+
+## Flex Direction
+
+[`flexDirection`](layout-props#flexdirection) controls the direction in which the children of a node are laid out. This is also referred to as the main axis. The cross axis is the axis perpendicular to the main axis, or the axis which the wrapping lines are laid out in.
+
+- `column` (**default value**) Align children from top to bottom. If wrapping is enabled, then the next line will start to the right of the first item on the top of the container.
+
+- `row` Align children from left to right. If wrapping is enabled, then the next line will start under the first item on the left of the container.
+
+- `column-reverse` Align children from bottom to top. If wrapping is enabled, then the next line will start to the right of the first item on the bottom of the container.
+
+- `row-reverse` Align children from right to left. If wrapping is enabled, then the next line will start under the first item on the right of the container.
+
+You can learn more [here](https://www.yogalayout.dev/docs/styling/flex-direction).
+
+
+
+
+```SnackPlayer name=Flex%20Direction&ext=js
+import React, {useState} from 'react';
+import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
+
+const FlexDirectionBasics = () => {
+ const [flexDirection, setflexDirection] = useState('column');
+
+ return (
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default FlexDirectionBasics;
+```
+
+
+
+
+```SnackPlayer name=Flex%20Direction&ext=tsx
+import React, {useState} from 'react';
+import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const FlexDirectionBasics = () => {
+ const [flexDirection, setflexDirection] = useState('column');
+
+ return (
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: string[];
+ selectedValue: string;
+ setSelectedValue: (value: string) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default FlexDirectionBasics;
+```
+
+
+
+
+## Layout Direction
+
+Layout [`direction`](layout-props#direction) specifies the direction in which children and text in a hierarchy should be laid out. Layout direction also affects what edge `start` and `end` refer to. By default, React Native lays out with LTR layout direction. In this mode `start` refers to left and `end` refers to right.
+
+- `LTR` (**default value**) Text and children are laid out from left to right. Margin and padding applied to the start of an element are applied on the left side.
+
+- `RTL` Text and children are laid out from right to left. Margin and padding applied to the start of an element are applied on the right side.
+
+
+
+
+```SnackPlayer name=Flex%20Direction&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const DirectionLayout = () => {
+ const [direction, setDirection] = useState('ltr');
+
+ return (
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default DirectionLayout;
+```
+
+
+
+
+```SnackPlayer name=Flex%20Direction&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const DirectionLayout = () => {
+ const [direction, setDirection] = useState('ltr');
+
+ return (
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: string[];
+ selectedValue: string;
+ setSelectedValue: (value: string) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default DirectionLayout;
+```
+
+
+
+
+## Justify Content
+
+[`justifyContent`](layout-props#justifycontent) describes how to align children within the main axis of their container. For example, you can use this property to center a child horizontally within a container with `flexDirection` set to `row` or vertically within a container with `flexDirection` set to `column`.
+
+- `flex-start`(**default value**) Align children of a container to the start of the container's main axis.
+
+- `flex-end` Align children of a container to the end of the container's main axis.
+
+- `center` Align children of a container in the center of the container's main axis.
+
+- `space-between` Evenly space off children across the container's main axis, distributing the remaining space between the children.
+
+- `space-around` Evenly space off children across the container's main axis, distributing the remaining space around the children. Compared to `space-between`, using `space-around` will result in space being distributed to the beginning of the first child and end of the last child.
+
+- `space-evenly` Evenly distribute children within the alignment container along the main axis. The spacing between each pair of adjacent items, the main-start edge and the first item, and the main-end edge and the last item, are all exactly the same.
+
+You can learn more [here](https://www.yogalayout.dev/docs/styling/justify-content).
+
+
+
+
+```SnackPlayer name=Justify%20Content&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const JustifyContentBasics = () => {
+ const [justifyContent, setJustifyContent] = useState('flex-start');
+
+ return (
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default JustifyContentBasics;
+```
+
+
+
+
+```SnackPlayer name=Justify%20Content&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const JustifyContentBasics = () => {
+ const [justifyContent, setJustifyContent] = useState('flex-start');
+
+ return (
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: string[];
+ selectedValue: string;
+ setSelectedValue: (value: string) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default JustifyContentBasics;
+```
+
+
+
+
+## Align Items
+
+[`alignItems`](layout-props#alignitems) describes how to align children along the cross axis of their container. It is very similar to `justifyContent` but instead of applying to the main axis, `alignItems` applies to the cross axis.
+
+- `stretch` (**default value**) Stretch children of a container to match the `height` of the container's cross axis.
+
+- `flex-start` Align children of a container to the start of the container's cross axis.
+
+- `flex-end` Align children of a container to the end of the container's cross axis.
+
+- `center` Align children of a container in the center of the container's cross axis.
+
+- `baseline` Align children of a container along a common baseline. Individual children can be set to be the reference baseline for their parents.
+
+:::info
+For `stretch` to have an effect, children must not have a fixed dimension along the secondary axis. In the following example, setting `alignItems: stretch` does nothing until the `width: 50` is removed from the children.
+:::
+
+You can learn more [here](https://www.yogalayout.dev/docs/styling/align-items-self).
+
+
+
+
+```SnackPlayer name=Align%20Items&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const AlignItemsLayout = () => {
+ const [alignItems, setAlignItems] = useState('stretch');
+
+ return (
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ minHeight: 200,
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default AlignItemsLayout;
+```
+
+
+
+
+```SnackPlayer name=Align%20Items&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const AlignItemsLayout = () => {
+ const [alignItems, setAlignItems] = useState('stretch');
+
+ return (
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: string[];
+ selectedValue: string;
+ setSelectedValue: (value: string) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ minHeight: 200,
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default AlignItemsLayout;
+```
+
+
+
+
+## Align Self
+
+[`alignSelf`](layout-props#alignself) has the same options and effect as `alignItems` but instead of affecting the children within a container, you can apply this property to a single child to change its alignment within its parent. `alignSelf` overrides any option set by the parent with `alignItems`.
+
+
+
+
+```SnackPlayer name=Align%20Self&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const AlignSelfLayout = () => {
+ const [alignSelf, setAlignSelf] = useState('stretch');
+
+ return (
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ minHeight: 200,
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default AlignSelfLayout;
+```
+
+
+
+
+```SnackPlayer name=Align%20Self&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+import type {FlexAlignType} from 'react-native';
+
+const AlignSelfLayout = () => {
+ const [alignSelf, setAlignSelf] = useState('stretch');
+
+ return (
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: FlexAlignType[];
+ selectedValue: string;
+ setSelectedValue: (value: FlexAlignType) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ minHeight: 200,
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default AlignSelfLayout;
+```
+
+
+
+
+## Align Content
+
+[alignContent](layout-props#aligncontent) defines the distribution of lines along the cross-axis. This only has effect when items are wrapped to multiple lines using `flexWrap`.
+
+- `flex-start` (**default value**) Align wrapped lines to the start of the container's cross axis.
+
+- `flex-end` Align wrapped lines to the end of the container's cross axis.
+
+- `stretch` (_default value when using Yoga on the web_) Stretch wrapped lines to match the height of the container's cross axis.
+
+- `center` Align wrapped lines in the center of the container's cross axis.
+
+- `space-between` Evenly space wrapped lines across the container's cross axis, distributing the remaining space between the lines.
+
+- `space-around` Evenly space wrapped lines across the container's cross axis, distributing the remaining space around the lines. Each end of the container has a half-sized space compared to the space between items.
+
+- `space-evenly` Evenly space wrapped lines across the container's cross axis, distributing the remaining space around the lines. Each space is the same size.
+
+You can learn more [here](https://www.yogalayout.dev/docs/styling/align-content).
+
+
+
+
+```SnackPlayer name=Align%20Content&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const AlignContentLayout = () => {
+ const [alignContent, setAlignContent] = useState('flex-start');
+
+ return (
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ flexWrap: 'wrap',
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ maxHeight: 400,
+ },
+ box: {
+ width: 50,
+ height: 80,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default AlignContentLayout;
+```
+
+
+
+
+```SnackPlayer name=Align%20Content&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const AlignContentLayout = () => {
+ const [alignContent, setAlignContent] = useState('flex-start');
+
+ return (
+
+
+
+
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: string[];
+ selectedValue: string;
+ setSelectedValue: (value: string) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ flexWrap: 'wrap',
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ maxHeight: 400,
+ },
+ box: {
+ width: 50,
+ height: 80,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default AlignContentLayout;
+```
+
+
+
+
+## Flex Wrap
+
+The [`flexWrap`](layout-props#flexwrap) property is set on containers and it controls what happens when children overflow the size of the container along the main axis. By default, children are forced into a single line (which can shrink elements). If wrapping is allowed, items are wrapped into multiple lines along the main axis if needed.
+
+When wrapping lines, `alignContent` can be used to specify how the lines are placed in the container. Learn more [here](https://www.yogalayout.dev/docs/styling/flex-wrap).
+
+
+
+
+```SnackPlayer name=Flex%20Wrap&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const FlexWrapLayout = () => {
+ const [flexWrap, setFlexWrap] = useState('wrap');
+
+ return (
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ maxHeight: 400,
+ },
+ box: {
+ width: 50,
+ height: 80,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default FlexWrapLayout;
+```
+
+
+
+
+```SnackPlayer name=Flex%20Wrap&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const FlexWrapLayout = () => {
+ const [flexWrap, setFlexWrap] = useState('wrap');
+
+ return (
+
+
+
+
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: string[];
+ selectedValue: string;
+ setSelectedValue: (value: string) => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ maxHeight: 400,
+ },
+ box: {
+ width: 50,
+ height: 80,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default FlexWrapLayout;
+```
+
+
+
+
+## Flex Basis, Grow, and Shrink
+
+- [`flexBasis`](layout-props#flexbasis) is an axis-independent way of providing the default size of an item along the main axis. Setting the `flexBasis` of a child is similar to setting the `width` of that child if its parent is a container with `flexDirection: row` or setting the `height` of a child if its parent is a container with `flexDirection: column`. The `flexBasis` of an item is the default size of that item, the size of the item before any `flexGrow` and `flexShrink` calculations are performed.
+
+- [`flexGrow`](layout-props#flexgrow) describes how much space within a container should be distributed among its children along the main axis. After laying out its children, a container will distribute any remaining space according to the flex grow values specified by its children.
+
+ `flexGrow` accepts any floating point value >= 0, with 0 being the default value. A container will distribute any remaining space among its children weighted by the children’s `flexGrow` values.
+
+- [`flexShrink`](layout-props#flexshrink) describes how to shrink children along the main axis in the case in which the total size of the children overflows the size of the container on the main axis. `flexShrink` is very similar to `flexGrow` and can be thought of in the same way if any overflowing size is considered to be negative remaining space. These two properties also work well together by allowing children to grow and shrink as needed.
+
+ `flexShrink` accepts any floating point value >= 0, with 0 being the default value (on the web, the default is 1). A container will shrink its children weighted by the children’s `flexShrink` values.
+
+You can learn more [here](https://www.yogalayout.dev/docs/styling/flex-basis-grow-shrink).
+
+
+
+
+```SnackPlayer name=Flex%20Basis%2C%20Grow%2C%20and%20Shrink&ext=js
+import React, {useState} from 'react';
+import {View, Text, TextInput, StyleSheet} from 'react-native';
+
+const App = () => {
+ const [powderblue, setPowderblue] = useState({
+ flexGrow: 0,
+ flexShrink: 1,
+ flexBasis: 'auto',
+ });
+ const [skyblue, setSkyblue] = useState({
+ flexGrow: 1,
+ flexShrink: 0,
+ flexBasis: 100,
+ });
+ const [steelblue, setSteelblue] = useState({
+ flexGrow: 0,
+ flexShrink: 1,
+ flexBasis: 200,
+ });
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const BoxInfo = ({color, flexBasis, flexShrink, setStyle, flexGrow}) => (
+
+
+
+ Box
+
+
+ flexBasis
+
+ setStyle(value => ({
+ ...value,
+ flexBasis: isNaN(parseInt(fB, 10)) ? 'auto' : parseInt(fB, 10),
+ }))
+ }
+ />
+ flexShrink
+
+ setStyle(value => ({
+ ...value,
+ flexShrink: isNaN(parseInt(fS, 10)) ? undefined : parseInt(fS, 10),
+ }))
+ }
+ />
+ flexGrow
+
+ setStyle(value => ({
+ ...value,
+ flexGrow: isNaN(parseInt(fG, 10)) ? undefined : parseInt(fG, 10),
+ }))
+ }
+ />
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingHorizontal: 10,
+ },
+ box: {
+ flex: 1,
+ height: 50,
+ width: 50,
+ },
+ boxLabel: {
+ minWidth: 80,
+ padding: 8,
+ borderRadius: 4,
+ marginTop: 8,
+ },
+ label: {
+ marginTop: 6,
+ fontSize: 16,
+ fontWeight: '100',
+ },
+ previewContainer: {
+ flex: 1,
+ flexDirection: 'row',
+ backgroundColor: 'aliceblue',
+ },
+ row: {
+ flex: 1,
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ alignItems: 'center',
+ marginBottom: 10,
+ },
+ input: {
+ borderBottomWidth: 1,
+ paddingVertical: 3,
+ width: 50,
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Flex%20Basis%2C%20Grow%2C%20and%20Shrink&ext=tsx
+import React, {useState} from 'react';
+import {View, Text, TextInput, StyleSheet} from 'react-native';
+import type {ViewStyle} from 'react-native';
+
+const App = () => {
+ const [powderblue, setPowderblue] = useState({
+ flexGrow: 0,
+ flexShrink: 1,
+ flexBasis: 'auto',
+ });
+ const [skyblue, setSkyblue] = useState({
+ flexGrow: 1,
+ flexShrink: 0,
+ flexBasis: 100,
+ });
+ const [steelblue, setSteelblue] = useState({
+ flexGrow: 0,
+ flexShrink: 1,
+ flexBasis: 200,
+ });
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+type BoxInfoProps = ViewStyle & {
+ color: string;
+ setStyle: React.Dispatch>;
+};
+
+const BoxInfo = ({
+ color,
+ flexBasis,
+ flexShrink,
+ setStyle,
+ flexGrow,
+}: BoxInfoProps) => (
+
+
+
+ Box
+
+
+ flexBasis
+
+ setStyle(value => ({
+ ...value,
+ flexBasis: isNaN(parseInt(fB, 10)) ? 'auto' : parseInt(fB, 10),
+ }))
+ }
+ />
+ flexShrink
+
+ setStyle(value => ({
+ ...value,
+ flexShrink: isNaN(parseInt(fS, 10)) ? undefined : parseInt(fS, 10),
+ }))
+ }
+ />
+ flexGrow
+
+ setStyle(value => ({
+ ...value,
+ flexGrow: isNaN(parseInt(fG, 10)) ? undefined : parseInt(fG, 10),
+ }))
+ }
+ />
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingHorizontal: 10,
+ },
+ box: {
+ flex: 1,
+ height: 50,
+ width: 50,
+ },
+ boxLabel: {
+ minWidth: 80,
+ padding: 8,
+ borderRadius: 4,
+ marginTop: 8,
+ },
+ label: {
+ marginTop: 6,
+ fontSize: 16,
+ fontWeight: '100',
+ },
+ previewContainer: {
+ flex: 1,
+ flexDirection: 'row',
+ backgroundColor: 'aliceblue',
+ },
+ row: {
+ flex: 1,
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ alignItems: 'center',
+ marginBottom: 10,
+ },
+ input: {
+ borderBottomWidth: 1,
+ paddingVertical: 3,
+ width: 50,
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+## Row Gap, Column Gap and Gap
+
+- [`rowGap`](layout-props#rowgap) sets the size of the gap (gutter) between an element's rows.
+
+- [`columnGap`](layout-props#columngap) sets the size of the gap (gutter) between an element's columns.
+
+- [`gap`](layout-props#gap) sets the size of the gap (gutter) between rows and columns. It is a shorthand for `rowGap` and `columnGap`.
+
+You can use `flexWrap` and `alignContent` along with `gap` to add consistent spacing between items.
+
+
+
+
+```SnackPlayer name=Row%20Gap%20and%20Column%20Gap&ext=js
+import React, {useState} from 'react';
+import {View, Text, StyleSheet, TextInput} from 'react-native';
+
+const RowGapAndColumnGap = () => {
+ const [rowGap, setRowGap] = useState(10);
+ const [columnGap, setColumnGap] = useState(10);
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ children,
+ handleColumnGapChange,
+ handleRowGapChange,
+ rowGap,
+ columnGap,
+}) => (
+
+
+
+ Row Gap
+ handleRowGapChange(Number(v))}
+ />
+
+
+ Column Gap
+ handleColumnGapChange(Number(v))}
+ />
+
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ itemsCenter: {alignItems: 'center'},
+ inputContainer: {
+ gap: 4,
+ flexDirection: 'row',
+ justifyContent: 'space-around',
+ },
+ previewContainer: {padding: 10, flex: 1},
+ input: {
+ borderBottomWidth: 1,
+ paddingVertical: 3,
+ width: 50,
+ textAlign: 'center',
+ },
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ maxHeight: 400,
+ flexWrap: 'wrap',
+ alignContent: 'flex-start',
+ },
+ box: {
+ width: 50,
+ height: 80,
+ },
+ box1: {
+ backgroundColor: 'orangered',
+ },
+ box2: {
+ backgroundColor: 'orange',
+ },
+ box3: {
+ backgroundColor: 'mediumseagreen',
+ },
+ box4: {
+ backgroundColor: 'deepskyblue',
+ },
+ box5: {
+ backgroundColor: 'mediumturquoise',
+ },
+});
+
+export default RowGapAndColumnGap;
+```
+
+
+
+
+```SnackPlayer name=Row%20Gap%20and%20Column%20Gap&ext=tsx
+import React, {useState} from 'react';
+import {View, Text, StyleSheet, TextInput} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const RowGapAndColumnGap = () => {
+ const [rowGap, setRowGap] = useState(10);
+ const [columnGap, setColumnGap] = useState(10);
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ columnGap: number;
+ handleColumnGapChange: (gap: number) => void;
+ rowGap: number;
+ handleRowGapChange: (gap: number) => void;
+}>;
+
+const PreviewLayout = ({
+ children,
+ handleColumnGapChange,
+ handleRowGapChange,
+ rowGap,
+ columnGap,
+}: PreviewLayoutProps) => (
+
+
+
+ Row Gap
+ handleRowGapChange(Number(v))}
+ />
+
+
+ Column Gap
+ handleColumnGapChange(Number(v))}
+ />
+
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ itemsCenter: {alignItems: 'center'},
+ inputContainer: {
+ gap: 4,
+ flexDirection: 'row',
+ justifyContent: 'space-around',
+ },
+ previewContainer: {padding: 10, flex: 1},
+ input: {
+ borderBottomWidth: 1,
+ paddingVertical: 3,
+ width: 50,
+ textAlign: 'center',
+ },
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ maxHeight: 400,
+ flexWrap: 'wrap',
+ alignContent: 'flex-start',
+ },
+ box: {
+ width: 50,
+ height: 80,
+ },
+ box1: {
+ backgroundColor: 'orangered',
+ },
+ box2: {
+ backgroundColor: 'orange',
+ },
+ box3: {
+ backgroundColor: 'mediumseagreen',
+ },
+ box4: {
+ backgroundColor: 'deepskyblue',
+ },
+ box5: {
+ backgroundColor: 'mediumturquoise',
+ },
+});
+
+export default RowGapAndColumnGap;
+```
+
+
+
+
+## Width and Height
+
+The `width` property specifies the width of an element's content area. Similarly, the `height` property specifies the height of an element's content area.
+
+Both `width` and `height` can take the following values:
+
+- `auto` (**default value**) React Native calculates the width/height for the element based on its content, whether that is other children, text, or an image.
+
+- `pixels` Defines the width/height in absolute pixels. Depending on other styles set on the component, this may or may not be the final dimension of the node.
+
+- `percentage` Defines the width or height in percentage of its parent's width or height, respectively.
+
+
+
+
+```SnackPlayer name=Width%20and%20Height&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const WidthHeightBasics = () => {
+ const [widthType, setWidthType] = useState('auto');
+ const [heightType, setHeightType] = useState('auto');
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ children,
+ widthType,
+ heightType,
+ widthValues,
+ heightValues,
+ setWidthType,
+ setHeightType,
+}) => (
+
+
+
+ width
+ {widthValues.map(value => (
+ setWidthType(value)}
+ style={[styles.button, widthType === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+
+ height
+ {heightValues.map(value => (
+ setHeightType(value)}
+ style={[styles.button, heightType === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+
+);
+
+const styles = StyleSheet.create({
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ padding: 8,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginRight: 10,
+ marginBottom: 10,
+ },
+ selected: {
+ backgroundColor: 'coral',
+ shadowOpacity: 0,
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default WidthHeightBasics;
+```
+
+
+
+
+```SnackPlayer name=Width%20and%20Height&ext=tsx
+import React, {useState, PropsWithChildren} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+type Dimension = 'auto' | `${number}%` | number;
+
+const WidthHeightBasics = () => {
+ const [widthType, setWidthType] = useState('auto');
+ const [heightType, setHeightType] = useState('auto');
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ widthType: Dimension;
+ heightType: Dimension;
+ widthValues: Dimension[];
+ heightValues: Dimension[];
+ setWidthType: (value: Dimension) => void;
+ setHeightType: (value: Dimension) => void;
+}>;
+
+const PreviewLayout = ({
+ children,
+ widthType,
+ heightType,
+ widthValues,
+ heightValues,
+ setWidthType,
+ setHeightType,
+}: PreviewLayoutProps) => (
+
+
+
+ width
+ {widthValues.map(value => (
+ setWidthType(value)}
+ style={[styles.button, widthType === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+
+ height
+ {heightValues.map(value => (
+ setHeightType(value)}
+ style={[styles.button, heightType === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+
+);
+
+const styles = StyleSheet.create({
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ padding: 8,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginRight: 10,
+ marginBottom: 10,
+ },
+ selected: {
+ backgroundColor: 'coral',
+ shadowOpacity: 0,
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default WidthHeightBasics;
+```
+
+
+
+
+## Position
+
+The `position` type of an element defines how it is positioned relative to either itself, its parent, or its [containing block](./flexbox.md#the-containing-block).
+
+- `relative` (**default value**) By default, an element is positioned relatively. This means an element is positioned according to the normal flow of the layout, and then offset relative to that position based on the values of `top`, `right`, `bottom`, and `left`. The offset does not affect the position of any sibling or parent elements.
+
+- `absolute` When positioned absolutely, an element doesn't take part in the normal layout flow. It is instead laid out independent of its siblings. The position is determined based on the `top`, `right`, `bottom`, and `left` values. These values will position the element relative to its containing block.
+
+- `static` When positioned statically, an element is positioned according to the normal flow of layout, and will ignore the `top`, `right`, `bottom`, and `left` values. This `position` will also cause the element to not form a containing block for absolute descendants, unless some other superceding style prop is present (e.g. `transform`). This allows `absolute` elements to be positioned to something that is not their parent. Note that **`static` is only available on the New Architecture**.
+
+
+
+
+```SnackPlayer name=Position&ext=js
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+
+const PositionLayout = () => {
+ const [position, setPosition] = useState('relative');
+
+ return (
+
+
+
+
+
+ );
+};
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ minHeight: 200,
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default PositionLayout;
+```
+
+
+
+
+```SnackPlayer name=Position&ext=tsx
+import React, {useState} from 'react';
+import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
+import type {PropsWithChildren} from 'react';
+
+const PositionLayout = () => {
+ const [position, setPosition] = useState<'relative' | 'absolute' | 'static'>(
+ 'relative',
+ );
+
+ return (
+
+
+
+
+
+ );
+};
+
+type PreviewLayoutProps = PropsWithChildren<{
+ label: string;
+ values: Array<'relative' | 'absolute' | 'static'>;
+ selectedValue: string;
+ setSelectedValue: (value: 'relative' | 'absolute' | 'static') => void;
+}>;
+
+const PreviewLayout = ({
+ label,
+ children,
+ values,
+ selectedValue,
+ setSelectedValue,
+}: PreviewLayoutProps) => (
+
+ {label}
+
+ {values.map(value => (
+ setSelectedValue(value)}
+ style={[styles.button, selectedValue === value && styles.selected]}>
+
+ {value}
+
+
+ ))}
+
+ {children}
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginTop: 8,
+ backgroundColor: 'aliceblue',
+ minHeight: 200,
+ },
+ box: {
+ width: 50,
+ height: 50,
+ },
+ row: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ button: {
+ paddingHorizontal: 8,
+ paddingVertical: 6,
+ borderRadius: 4,
+ backgroundColor: 'oldlace',
+ alignSelf: 'flex-start',
+ marginHorizontal: '1%',
+ marginBottom: 6,
+ minWidth: '48%',
+ textAlign: 'center',
+ },
+ selected: {
+ backgroundColor: 'coral',
+ borderWidth: 0,
+ },
+ buttonLabel: {
+ fontSize: 12,
+ fontWeight: '500',
+ color: 'coral',
+ },
+ selectedLabel: {
+ color: 'white',
+ },
+ label: {
+ textAlign: 'center',
+ marginBottom: 10,
+ fontSize: 24,
+ },
+});
+
+export default PositionLayout;
+```
+
+
+
+
+## The Containing Block
+
+The containing block of an element is an ancestor element which controls its position and size.
+The way containing blocks work in React Native is very similar to [how they work on the web](https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block), with some simplifications due to the lack of some web features.
+
+The `top`, `right`, `bottom`, and `left` values of an absolutely positioned element will be
+relative to its containing block.
+
+Percentage lengths (e.g.: `width: '50%'` or `padding: '10%'`) applied to absolutely positioned elements will be calculated relatively to the size of its containing block. For example, if the containing block is 100 points wide, then `width: 50%` on an absolutely positioned element will cause it to be 50 points wide.
+
+The following list will help you determine the containing block of any given element:
+
+- If that element has a `position` type of `relative` or `static`, then its containing block is its parent.
+- If that element has a `position` type of `absolute`, then its containing block is the nearest ancestor in which one of the following is true:
+ - It has a `position` type other than `static`
+ - It has a `transform`
+
+## Going Deeper
+
+Check out the interactive [yoga playground](https://www.yogalayout.dev/playground) that you can use to get a better understanding of flexbox.
+
+We've covered the basics, but there are many other styles you may need for layouts. The full list of props that control layout is documented [here](./layout-props.md).
+
+Additionally, you can see some examples from [Wix Engineers](https://medium.com/wix-engineering/the-full-react-native-layout-cheat-sheet-a4147802405c).
diff --git a/website/versioned_docs/version-0.86/gesture-responder-system.md b/website/versioned_docs/version-0.86/gesture-responder-system.md
new file mode 100644
index 00000000000..e30fc80373c
--- /dev/null
+++ b/website/versioned_docs/version-0.86/gesture-responder-system.md
@@ -0,0 +1,66 @@
+---
+id: gesture-responder-system
+title: Gesture Responder System
+---
+
+The gesture responder system manages the lifecycle of gestures in your app. A touch can go through several phases as the app determines what the user's intention is. For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. This can even change during the duration of a touch. There can also be multiple simultaneous touches.
+
+The touch responder system is needed to allow components to negotiate these touch interactions without any additional knowledge about their parent or child components.
+
+### Best Practices
+
+To make your app feel great, every action should have the following attributes:
+
+- Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture
+- Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away
+
+These features make users more comfortable while using an app, because it allows people to experiment and interact without fear of making mistakes.
+
+### TouchableHighlight and Touchable\*
+
+The responder system can be complicated to use. So we have provided an abstract `Touchable` implementation for things that should be "tappable". This uses the responder system and allows you to configure tap interactions declaratively. Use `TouchableHighlight` anywhere where you would use a button or link on web.
+
+## Responder Lifecycle
+
+A view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder:
+
+- `View.props.onStartShouldSetResponder: evt => true,` - Does this view want to become responder on the start of a touch?
+- `View.props.onMoveShouldSetResponder: evt => true,` - Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?
+
+If the View returns true and attempts to become the responder, one of the following will happen:
+
+- `View.props.onResponderGrant: evt => {}` - The View is now responding for touch events. This is the time to highlight and show the user what is happening
+- `View.props.onResponderReject: evt => {}` - Something else is the responder right now and will not release it
+
+If the view is responding, the following handlers can be called:
+
+- `View.props.onResponderMove: evt => {}` - The user is moving their finger
+- `View.props.onResponderRelease: evt => {}` - Fired at the end of the touch, ie "touchUp"
+- `View.props.onResponderTerminationRequest: evt => true` - Something else wants to become responder. Should this view release the responder? Returning true allows release
+- `View.props.onResponderTerminate: evt => {}` - The responder has been taken from the View. Might be taken by other views after a call to `onResponderTerminationRequest`, or might be taken by the OS without asking (happens with control center/ notification center on iOS)
+
+`evt` is a synthetic touch event with the following form:
+
+- `nativeEvent`
+ - `changedTouches` - Array of all touch events that have changed since the last event
+ - `identifier` - The ID of the touch
+ - `locationX` - The X position of the touch, relative to the element
+ - `locationY` - The Y position of the touch, relative to the element
+ - `pageX` - The X position of the touch, relative to the root element
+ - `pageY` - The Y position of the touch, relative to the root element
+ - `target` - The node id of the element receiving the touch event
+ - `timestamp` - A time identifier for the touch, useful for velocity calculation
+ - `touches` - Array of all current touches on the screen
+
+### Capture ShouldSet Handlers
+
+`onStartShouldSetResponder` and `onMoveShouldSetResponder` are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for `*ShouldSetResponder` handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable.
+
+However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing `on*ShouldSetResponderCapture`. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a `onStartShouldSetResponderCapture` handler which returns true.
+
+- `View.props.onStartShouldSetResponderCapture: evt => true,`
+- `View.props.onMoveShouldSetResponderCapture: evt => true,`
+
+### PanResponder
+
+For higher-level gesture interpretation, check out [PanResponder](panresponder.md).
diff --git a/website/versioned_docs/version-0.86/get-started-without-a-framework.md b/website/versioned_docs/version-0.86/get-started-without-a-framework.md
new file mode 100644
index 00000000000..d14bc2be8d8
--- /dev/null
+++ b/website/versioned_docs/version-0.86/get-started-without-a-framework.md
@@ -0,0 +1,122 @@
+---
+id: getting-started-without-a-framework
+title: Get Started Without a Framework
+hide_table_of_contents: true
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import constants from '@site/core/TabsConstants';
+import PlatformSupport from '@site/src/theme/PlatformSupport';
+
+import RemoveGlobalCLI from './\_remove-global-cli.md';
+
+
+
+If you have constraints that are not served well by a [Framework](/architecture/glossary#react-native-framework), or you prefer to write your own Framework, you can create a React Native app without using a Framework.
+
+To do so, you'll first need to [set up your environment](set-up-your-environment). Once you're set up, continue with the steps below to create an application and start developing.
+
+### Step 1: Creating a new application
+
+
+
+You can use [React Native Community CLI](https://github.com/react-native-community/cli) to generate a new project. Let's create a new React Native project called "AwesomeProject":
+
+```shell
+npx @react-native-community/cli@latest init AwesomeProject
+```
+
+This is not necessary if you are integrating React Native into an existing application, or if you've installed [Expo](https://docs.expo.dev/bare/installing-expo-modules/) in your project, or if you're adding Android support to an existing React Native project (see [Integration with Existing Apps](integration-with-existing-apps.md)). You can also use a third-party CLI to set up your React Native app, such as [Ignite CLI](https://github.com/infinitered/ignite).
+
+:::info
+
+If you are having trouble with iOS, try to reinstall the dependencies by running:
+
+1. `cd ios` to navigate to the `ios` folder.
+2. `bundle install` to install [Bundler](https://bundler.io/)
+3. `bundle exec pod install` to install the iOS dependencies managed by CocoaPods.
+
+:::
+
+#### [Optional] Using a specific version or template
+
+If you want to start a new project with a specific React Native version, you can use the `--version` argument:
+
+```shell
+npx @react-native-community/cli@X.XX.X init AwesomeProject --version X.XX.X
+```
+
+You can also start a project with a custom React Native template with the `--template` argument, read more [here](https://github.com/react-native-community/cli/blob/main/docs/init.md#initializing-project-with-custom-template).
+
+### Step 2: Start Metro
+
+[**Metro**](https://metrobundler.dev/) is the JavaScript build tool for React Native. To start the Metro development server, run the following from your project folder:
+
+
+
+
+```shell
+npm start
+```
+
+
+
+
+```shell
+yarn start
+```
+
+
+
+
+:::note
+If you're familiar with web development, Metro is similar to bundlers such as Vite and webpack, but is designed end-to-end for React Native. For instance, Metro uses [Babel](https://babel.dev/) to transform syntax such as JSX into executable JavaScript.
+:::
+
+### Step 3: Start your application
+
+Let Metro Bundler run in its own terminal. Open a new terminal inside your React Native project folder. Run the following:
+
+
+
+
+```shell
+npm run android
+```
+
+
+
+
+```shell
+yarn android
+```
+
+
+
+
+If everything is set up correctly, you should see your new app running in your Android emulator shortly.
+
+This is one way to run your app - you can also run it directly from within Android Studio.
+
+:::tip
+If you can't get this to work, see the [Troubleshooting](troubleshooting.md) page.
+:::
+
+### Step 4: Modifying your app
+
+Now that you have successfully run the app, let's modify it.
+
+- Open `App.tsx` in your text editor of choice and edit some lines.
+- Press the R key twice or select `Reload` from the Dev Menu (Ctrl + M) to see your changes!
+
+### That's it!
+
+Congratulations! You've successfully run and modified your first barebone React Native app.
+
+
+
+### Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](integration-with-existing-apps.md).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](getting-started).
diff --git a/website/versioned_docs/version-0.86/getting-started.md b/website/versioned_docs/version-0.86/getting-started.md
new file mode 100644
index 00000000000..35ca76f5638
--- /dev/null
+++ b/website/versioned_docs/version-0.86/getting-started.md
@@ -0,0 +1,49 @@
+---
+id: environment-setup
+title: Get Started with React Native
+hide_table_of_contents: true
+---
+
+import PlatformSupport from '@site/src/theme/PlatformSupport';
+import BoxLink from '@site/src/theme/BoxLink';
+
+**React Native allows developers who know React to create native apps.** At the same time, native developers can use React Native to gain parity between native platforms by writing common features once.
+
+We believe that the best way to experience React Native is through a **Framework**, a toolbox with all the necessary APIs to let you build production ready apps.
+
+You can also use React Native without a Framework, however we’ve found that most developers benefit from using a React Native Framework like [Expo](https://expo.dev). Expo provides features like file-based routing, high-quality universal libraries, and the ability to write plugins that modify native code without having to manage native files.
+
+
+Can I use React Native without a Framework?
+
+Yes. You can use React Native without a Framework. **However, if you’re building a new app with React Native, we recommend using a Framework.**
+
+In short, you’ll be able to spend time writing your app instead of writing an entire Framework yourself in addition to your app.
+
+The React Native community has spent years refining approaches to navigation, accessing native APIs, dealing with native dependencies, and more. Most apps need these core features. A React Native Framework provides them from the start of your app.
+
+Without a Framework, you’ll either have to write your own solutions to implement core features, or you’ll have to piece together a collection of pre-existing libraries to create a skeleton of a Framework. This takes real work, both when starting your app, then later when maintaining it.
+
+If your app has unusual constraints that are not served well by a Framework, or you prefer to solve these problems yourself, you can make a React Native app without a Framework using Android Studio, Xcode. If you’re interested in this path, learn how to [set up your environment](set-up-your-environment) and how to [get started without a framework](getting-started-without-a-framework).
+
+
+
+## Start a new React Native project with Expo
+
+
+
+Expo is a production-grade React Native Framework. Expo provides developer tooling that makes developing apps easier, such as file-based routing, a standard library of native modules, and much more.
+
+Expo's Framework is free and open source, with an active community on [GitHub](https://github.com/expo) and [Discord](https://chat.expo.dev). The Expo team works in close collaboration with the React Native team at Meta to bring the latest React Native features to the Expo SDK.
+
+The team at Expo also provides Expo Application Services (EAS), an optional set of services that complements Expo, the Framework, in each step of the development process.
+
+To create a new Expo project, run the following in your terminal:
+
+```shell
+npx create-expo-app@latest
+```
+
+Once you’ve created your app, check out the rest of Expo’s getting started guide to start developing your app.
+
+Continue with Expo
diff --git a/website/versioned_docs/version-0.86/global-AbortController.md b/website/versioned_docs/version-0.86/global-AbortController.md
new file mode 100644
index 00000000000..6aaa3ca36e9
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-AbortController.md
@@ -0,0 +1,10 @@
+---
+id: global-AbortController
+title: AbortController
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information.
+:::
+
+The global `AbortController` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-AbortSignal.md b/website/versioned_docs/version-0.86/global-AbortSignal.md
new file mode 100644
index 00000000000..996100980e7
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-AbortSignal.md
@@ -0,0 +1,10 @@
+---
+id: global-AbortSignal
+title: AbortSignal
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) for more information.
+:::
+
+The global `AbortSignal` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-Blob.md b/website/versioned_docs/version-0.86/global-Blob.md
new file mode 100644
index 00000000000..d73aa30497d
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-Blob.md
@@ -0,0 +1,10 @@
+---
+id: global-Blob
+title: Blob
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob) for more information.
+:::
+
+The global `Blob` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-EventCounts.md b/website/versioned_docs/version-0.86/global-EventCounts.md
new file mode 100644
index 00000000000..efffe3b13f8
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-EventCounts.md
@@ -0,0 +1,6 @@
+---
+id: global-EventCounts
+title: EventCounts
+---
+
+The global [`EventCounts`](https://developer.mozilla.org/en-US/docs/Web/API/EventCounts) class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-File.md b/website/versioned_docs/version-0.86/global-File.md
new file mode 100644
index 00000000000..0eb717f6fce
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-File.md
@@ -0,0 +1,10 @@
+---
+id: global-File
+title: File
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/File) for more information.
+:::
+
+The global `File` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-FileReader.md b/website/versioned_docs/version-0.86/global-FileReader.md
new file mode 100644
index 00000000000..8cb698957a1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-FileReader.md
@@ -0,0 +1,10 @@
+---
+id: global-FileReader
+title: FileReader
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReader) for more information.
+:::
+
+The global `FileReader` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-FormData.md b/website/versioned_docs/version-0.86/global-FormData.md
new file mode 100644
index 00000000000..c405b5bf4b0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-FormData.md
@@ -0,0 +1,10 @@
+---
+id: global-FormData
+title: FormData
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData) for more information.
+:::
+
+The global `FormData` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-Headers.md b/website/versioned_docs/version-0.86/global-Headers.md
new file mode 100644
index 00000000000..591d41e18fe
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-Headers.md
@@ -0,0 +1,10 @@
+---
+id: global-Headers
+title: Headers
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers) for more information.
+:::
+
+The global `Headers` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-PerformanceEntry.md b/website/versioned_docs/version-0.86/global-PerformanceEntry.md
new file mode 100644
index 00000000000..70d0704cc2f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceEntry.md
@@ -0,0 +1,6 @@
+---
+id: global-PerformanceEntry
+title: PerformanceEntry
+---
+
+The global [`PerformanceEntry`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry) class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-PerformanceEventTiming.md b/website/versioned_docs/version-0.86/global-PerformanceEventTiming.md
new file mode 100644
index 00000000000..e28106b390e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceEventTiming.md
@@ -0,0 +1,10 @@
+---
+id: global-PerformanceEventTiming
+title: PerformanceEventTiming
+---
+
+The global [`PerformanceEventTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEventTiming) class, as defined in Web specifications.
+
+:::warning Partial support
+The `cancelable` and `target` properties are not supported yet.
+:::
diff --git a/website/versioned_docs/version-0.86/global-PerformanceLongTaskTiming.md b/website/versioned_docs/version-0.86/global-PerformanceLongTaskTiming.md
new file mode 100644
index 00000000000..c951fcc18f4
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceLongTaskTiming.md
@@ -0,0 +1,10 @@
+---
+id: global-PerformanceLongTaskTiming
+title: PerformanceLongTaskTiming
+---
+
+The global [`PerformanceLongTaskTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceLongTaskTiming) class, as defined in Web specifications.
+
+:::warning Partial support
+The value for the `attribution` property is always an empty array.
+:::
diff --git a/website/versioned_docs/version-0.86/global-PerformanceMark.md b/website/versioned_docs/version-0.86/global-PerformanceMark.md
new file mode 100644
index 00000000000..5459c81f225
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceMark.md
@@ -0,0 +1,6 @@
+---
+id: global-PerformanceMark
+title: PerformanceMark
+---
+
+The global [`PerformanceMark`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark) class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-PerformanceMeasure.md b/website/versioned_docs/version-0.86/global-PerformanceMeasure.md
new file mode 100644
index 00000000000..47603dd8828
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceMeasure.md
@@ -0,0 +1,6 @@
+---
+id: global-PerformanceMeasure
+title: PerformanceMeasure
+---
+
+The global [`PerformanceMeasure`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMeasure) class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-PerformanceObserver.md b/website/versioned_docs/version-0.86/global-PerformanceObserver.md
new file mode 100644
index 00000000000..3c99cd0f63d
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceObserver.md
@@ -0,0 +1,58 @@
+---
+id: global-PerformanceObserver
+title: PerformanceObserver
+---
+
+The global [`PerformanceObserver`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver) class, as defined in Web specifications.
+
+## Example
+
+```ts
+const observer = new PerformanceObserver(
+ (list, observer, options) => {
+ for (const entry of list.getEntries()) {
+ console.log(
+ 'Received entry with type',
+ entry.entryType,
+ 'and name',
+ entry.name,
+ 'that started at',
+ entry.startTime,
+ 'and took',
+ entry.duration,
+ 'ms',
+ );
+ }
+ },
+);
+
+observer.observe({entryTypes: ['mark', 'measure']});
+```
+
+---
+
+# Reference
+
+## Constructor
+
+### `PerformanceObserver()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/PerformanceObserver).
+
+## Static properties
+
+### `supportedEntryTypes`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/supportedEntryTypes).
+
+Returns `['mark', 'measure', 'event', 'longtask', 'resource']`.
+
+## Instance methods
+
+### `observe()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe).
+
+### `disconnect()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/disconnect).
diff --git a/website/versioned_docs/version-0.86/global-PerformanceObserverEntryList.md b/website/versioned_docs/version-0.86/global-PerformanceObserverEntryList.md
new file mode 100644
index 00000000000..d6a7f387f2e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceObserverEntryList.md
@@ -0,0 +1,6 @@
+---
+id: global-PerformanceObserverEntryList
+title: PerformanceObserverEntryList
+---
+
+The global [`PerformanceObserverEntryList`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserverEntryList) class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-PerformanceResourceTiming.md b/website/versioned_docs/version-0.86/global-PerformanceResourceTiming.md
new file mode 100644
index 00000000000..60da4656aeb
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-PerformanceResourceTiming.md
@@ -0,0 +1,23 @@
+---
+id: global-PerformanceResourceTiming
+title: PerformanceResourceTiming
+---
+
+The global [`PerformanceResourceTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming) class, as defined in Web specifications.
+
+:::warning Partial support
+
+React Native implements the following `PerformanceResourceTiming` properties only:
+
+- `fetchStart`
+- `requestStart`
+- `connectStart`
+- `connectEnd`
+- `responseStart`
+- `responseEnd`
+- `responseStatus`
+- `contentType`
+- `encodedBodySize`
+- `decodedBodySize`
+
+:::
diff --git a/website/versioned_docs/version-0.86/global-Request.md b/website/versioned_docs/version-0.86/global-Request.md
new file mode 100644
index 00000000000..3a775cb8603
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-Request.md
@@ -0,0 +1,10 @@
+---
+id: global-Request
+title: Request
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request) for more information.
+:::
+
+The global `Request` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-Response.md b/website/versioned_docs/version-0.86/global-Response.md
new file mode 100644
index 00000000000..96cd3efbc27
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-Response.md
@@ -0,0 +1,10 @@
+---
+id: global-Response
+title: Response
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Response) for more information.
+:::
+
+The global `Response` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-URL.md b/website/versioned_docs/version-0.86/global-URL.md
new file mode 100644
index 00000000000..bf911b56675
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-URL.md
@@ -0,0 +1,10 @@
+---
+id: global-URL
+title: URL
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/URL) for more information.
+:::
+
+The global `URL` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-URLSearchParams.md b/website/versioned_docs/version-0.86/global-URLSearchParams.md
new file mode 100644
index 00000000000..e1f85c7ea31
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-URLSearchParams.md
@@ -0,0 +1,10 @@
+---
+id: global-URLSearchParams
+title: URLSearchParams
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) for more information.\
+:::
+
+The global `URLSearchParams` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-WebSocket.md b/website/versioned_docs/version-0.86/global-WebSocket.md
new file mode 100644
index 00000000000..38b10ba5cf9
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-WebSocket.md
@@ -0,0 +1,10 @@
+---
+id: global-WebSocket
+title: WebSocket
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) for more information.
+:::
+
+The global `WebSocket` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-XMLHttpRequest.md b/website/versioned_docs/version-0.86/global-XMLHttpRequest.md
new file mode 100644
index 00000000000..dc960aa5f59
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-XMLHttpRequest.md
@@ -0,0 +1,10 @@
+---
+id: global-XMLHttpRequest
+title: XMLHttpRequest
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) for more information.
+:::
+
+The global `XMLHttpRequest` class, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-__DEV__.md b/website/versioned_docs/version-0.86/global-__DEV__.md
new file mode 100644
index 00000000000..ca3cc3104ba
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-__DEV__.md
@@ -0,0 +1,8 @@
+---
+id: global-__DEV__
+title: ✨ __DEV__
+---
+
+You can use the `__DEV__` pseudo-global variable in the codebase to guard development-only blocks of code.
+
+It is inlined during compilation and gets completely stripped out with the `if` blocks it guards in the minified build.
diff --git a/website/versioned_docs/version-0.86/global-alert.md b/website/versioned_docs/version-0.86/global-alert.md
new file mode 100644
index 00000000000..56889709655
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-alert.md
@@ -0,0 +1,10 @@
+---
+id: global-alert
+title: alert
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/alert) for more information.
+:::
+
+The global `alert` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-cancelAnimationFrame.md b/website/versioned_docs/version-0.86/global-cancelAnimationFrame.md
new file mode 100644
index 00000000000..f0396b2e590
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-cancelAnimationFrame.md
@@ -0,0 +1,10 @@
+---
+id: global-cancelAnimationFrame
+title: cancelAnimationFrame
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame) for more information.
+:::
+
+The global `cancelAnimationFrame` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-cancelIdleCallback.md b/website/versioned_docs/version-0.86/global-cancelIdleCallback.md
new file mode 100644
index 00000000000..0626c3b8738
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-cancelIdleCallback.md
@@ -0,0 +1,10 @@
+---
+id: global-cancelIdleCallback
+title: cancelIdleCallback
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelIdleCallback) for more information.
+:::
+
+The global `cancelIdleCallback` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-clearInterval.md b/website/versioned_docs/version-0.86/global-clearInterval.md
new file mode 100644
index 00000000000..d592f85f25b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-clearInterval.md
@@ -0,0 +1,10 @@
+---
+id: global-clearInterval
+title: clearInterval
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearInterval) for more information.
+:::
+
+The global `clearInterval` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-clearTimeout.md b/website/versioned_docs/version-0.86/global-clearTimeout.md
new file mode 100644
index 00000000000..a80c720fc30
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-clearTimeout.md
@@ -0,0 +1,10 @@
+---
+id: global-clearTimeout
+title: clearTimeout
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearTimeout) for more information.
+:::
+
+The global `clearTimeout` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-console.md b/website/versioned_docs/version-0.86/global-console.md
new file mode 100644
index 00000000000..c76c6828915
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-console.md
@@ -0,0 +1,55 @@
+---
+id: global-console
+title: console
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/console) for more information.
+:::
+
+The global `console` object, as defined in Web specifications.
+
+---
+
+## Methods
+
+### `timeStamp()`
+
+```tsx
+console.timeStamp(
+ label: string,
+ start?: string | number,
+ end?: string | number,
+ trackName?: string,
+ trackGroup?: string,
+ color?: DevToolsColor
+): void;
+```
+
+The `console.timeStamp` API allows you to add custom timing entries in the Performance panel timeline.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---------- | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| label | `string` | Yes | The label for the timing entry. |
+| start | `string \| number` | No |
If string, the name of a previously recorded timestamp with `console.timeStamp`.
If number, the [DOMHighResTimeStamp](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp). For example, from `performance.now()`.
If undefined, the current time is used.
|
+| end | `string \| number` | No |
If string, the name of a previously recorded timestamp with `console.timeStamp`.
If number, the [DOMHighResTimeStamp](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp). For example, from `performance.now()`.
If undefined, the current time is used.
|
+| trackName | `string` | No | The name of the custom track. |
+| trackGroup | `string` | No | The name of the track group. |
+| color | `DevToolsColor` | No | The color of the entry. |
+
+```tsx
+type DevToolsColor =
+ | 'primary'
+ | 'primary-light'
+ | 'primary-dark'
+ | 'secondary'
+ | 'secondary-light'
+ | 'secondary-dark'
+ | 'tertiary'
+ | 'tertiary-light'
+ | 'tertiary-dark'
+ | 'warning'
+ | 'error';
+```
diff --git a/website/versioned_docs/version-0.86/global-fetch.md b/website/versioned_docs/version-0.86/global-fetch.md
new file mode 100644
index 00000000000..95a28772fe7
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-fetch.md
@@ -0,0 +1,10 @@
+---
+id: global-fetch
+title: fetch
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch) for more information.
+:::
+
+The global `fetch` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-global.md b/website/versioned_docs/version-0.86/global-global.md
new file mode 100644
index 00000000000..49988b52bad
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-global.md
@@ -0,0 +1,8 @@
+---
+id: global-global
+title: global
+---
+
+[`global`](https://nodejs.org/api/globals.html#global) is a legacy alias for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), as defined in Node.js.
+
+The use of `globalThis` is recommended over `global`.
diff --git a/website/versioned_docs/version-0.86/global-intersectionobserver.md b/website/versioned_docs/version-0.86/global-intersectionobserver.md
new file mode 100644
index 00000000000..24b8672dfd1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-intersectionobserver.md
@@ -0,0 +1,108 @@
+---
+id: global-intersectionobserver
+title: IntersectionObserver 🧪
+---
+
+import CanaryAPIWarning from './\_canary-channel-api-warning.mdx';
+
+
+
+The global [`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver) interface, as defined in Web specifications. It provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.
+
+---
+
+# Reference
+
+## Constructor
+
+### `IntersectionObserver()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver).
+
+Creates a new `IntersectionObserver` object which will execute a specified callback function when it detects that a target element's visibility has crossed one or more `threshold` or `rnRootThreshold` values.
+
+```ts
+new IntersectionObserver(callback, options?)
+```
+
+#### Parameters
+
+**`callback`**
+
+A function which is called when the percentage of the target element is visible crosses a threshold. The callback receives two parameters:
+
+- `entries`: An array of [`IntersectionObserverEntry`](global-intersectionobserverentry) objects, each representing one threshold which was crossed, either becoming more or less visible than the percentage specified by that threshold.
+- `observer`: The `IntersectionObserver` instance which invoked the callback.
+
+**`options`** (optional)
+
+An optional object with the following properties:
+
+| Name | Type | Description |
+| -------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `root` | [Element](element-nodes) \| null | An element that is an ancestor of the target, whose bounding rectangle will be considered the viewport. Defaults to the root viewport if not specified or if `null`. |
+| `rootMargin` | string | A string which specifies a set of offsets to add to the root's bounding box when calculating intersections. Defaults to `"0px 0px 0px 0px"`. |
+| `threshold` | number \| number[] | Either a single number or an array of numbers between 0.0 and 1.0, specifying a ratio of intersection area to total bounding box area for the observed target. Defaults to `[0]` if `rnRootThreshold` is not set. |
+| `rnRootThreshold` ⚠️ | number \| number[] | **React Native specific.** Either a single number or an array of numbers between 0.0 and 1.0, specifying a ratio of intersection area to the total root area. |
+
+## Instance properties
+
+### `root`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/root).
+
+The element or document whose bounds are used as the bounding box when testing for intersection.
+
+### `rootMargin`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin).
+
+An offset rectangle applied to the root's bounding box when calculating intersections.
+
+### `rnRootThresholds` ⚠️
+
+:::warning Non-standard
+This is a React Native specific extension.
+:::
+
+A list of root thresholds, sorted in increasing numeric order, where each threshold is a ratio of intersection area to bounding box area of the specified root view, which defaults to the viewport.
+
+Notifications for a target are generated when any of the thresholds specified in `rnRootThresholds` or `thresholds` are crossed for that target.
+
+```ts
+get rnRootThresholds(): ReadonlyArray | null;
+```
+
+### `thresholds`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/thresholds).
+
+A list of thresholds, sorted in increasing numeric order, where each threshold is a ratio of intersection area to bounding box area of an observed target.
+
+Notifications for a target are generated when any of the thresholds specified in `rnRootThresholds` or `thresholds` are crossed for that target.
+
+## Instance methods
+
+### `disconnect()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/disconnect).
+
+Stops the `IntersectionObserver` object from observing any target.
+
+### `observe()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/observe).
+
+Tells the `IntersectionObserver` to begin observing a target element.
+
+### `takeRecords()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/takeRecords).
+
+Returns an array of `IntersectionObserverEntry` objects for all observed targets.
+
+### `unobserve()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/unobserve).
+
+Tells the `IntersectionObserver` to stop observing a particular target element.
diff --git a/website/versioned_docs/version-0.86/global-intersectionobserverentry.md b/website/versioned_docs/version-0.86/global-intersectionobserverentry.md
new file mode 100644
index 00000000000..656be66b744
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-intersectionobserverentry.md
@@ -0,0 +1,74 @@
+---
+id: global-intersectionobserverentry
+title: IntersectionObserverEntry 🧪
+---
+
+import CanaryAPIWarning from './\_canary-channel-api-warning.mdx';
+
+
+
+The [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry) interface, as defined in Web specifications. It describes the intersection between the target element and its root container at a specific moment of transition.
+
+Instances of `IntersectionObserverEntry` are delivered to an [`IntersectionObserver`](global-intersectionobserver) callback in its `entries` parameter.
+
+---
+
+# Reference
+
+## Instance properties
+
+### `boundingClientRect`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/boundingClientRect).
+
+Returns the bounds rectangle of the target element as a `DOMRectReadOnly`.
+
+### `intersectionRatio`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/intersectionRatio).
+
+Returns the ratio of the `intersectionRect` to the `boundingClientRect`.
+
+### `intersectionRect`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/intersectionRect).
+
+Returns a `DOMRectReadOnly` representing the target's visible area.
+
+### `isIntersecting`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/isIntersecting).
+
+A Boolean value which is `true` if the target element intersects with the intersection observer's root. If this is `true`, then the `IntersectionObserverEntry` describes a transition into a state of intersection; if it's `false`, then you know the transition is from intersecting to not-intersecting.
+
+### `rnRootIntersectionRatio` ⚠️
+
+:::warning Non-standard
+This is a React Native specific extension.
+:::
+
+Returns the ratio of the `intersectionRect` to the `rootBounds`.
+
+```ts
+get rnRootIntersectionRatio(): number;
+```
+
+This is analogous to `intersectionRatio`, but computed relative to the root's bounding box instead of the target's bounding box. This corresponds to the `rnRootThreshold` option and allows you to determine what percentage of the root area is covered by the target element.
+
+### `rootBounds`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/rootBounds).
+
+Returns a `DOMRectReadOnly` for the intersection observer's root.
+
+### `target`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/target).
+
+The `Element` whose intersection with the root changed.
+
+### `time`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry/time).
+
+A `DOMHighResTimeStamp` indicating the time at which the intersection was recorded, relative to the `IntersectionObserver`'s time origin.
diff --git a/website/versioned_docs/version-0.86/global-navigator.md b/website/versioned_docs/version-0.86/global-navigator.md
new file mode 100644
index 00000000000..e145ae708b6
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-navigator.md
@@ -0,0 +1,10 @@
+---
+id: global-navigator
+title: navigator
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator) for more information.
+:::
+
+The global `navigator` object, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-performance.md b/website/versioned_docs/version-0.86/global-performance.md
new file mode 100644
index 00000000000..488f55020ef
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-performance.md
@@ -0,0 +1,86 @@
+---
+id: global-performance
+title: performance
+---
+
+The global [`performance`](https://developer.mozilla.org/en-US/docs/Web/API/Window/performance) object, as defined in Web specifications.
+
+---
+
+# Reference
+
+## Instance properties
+
+### `eventCounts`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/eventCounts).
+
+### `memory`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/memory).
+
+### `rnStartupTiming` ⚠️
+
+:::warning Non-standard
+This is a React Native specific extension.
+:::
+
+Provides information about the startup time of the application.
+
+```ts
+get rnStartupTiming(): ReactNativeStartupTiming;
+```
+
+The `ReactNativeStartupTiming` interface provides the following fields:
+
+| Name | Type | Description |
+| ---------------------------------------- | -------------- | --------------------------------------------------------- |
+| `startTime` | number \| void | When the React Native runtime initialization was started. |
+| `executeJavaScriptBundleEntryPointStart` | number \| void | When the execution of the application bundle was started. |
+| `endTime` | number \| void | When the React Native runtime was fully initialized. |
+
+### `timeOrigin`
+
+:::warning Partial support
+Provides the number of milliseconds from the UNIX epoch until system boot, instead of the number of milliseconds from the UNIX epoch until app startup.
+:::
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin).
+
+## Instance methods
+
+### `clearMarks()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks).
+
+### `clearMeasures()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures).
+
+### `getEntries()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntries).
+
+### `getEntriesByName()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName).
+
+### `getEntriesByType()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType).
+
+### `mark()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark).
+
+### `measure()`
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure).
+
+### `now()`
+
+:::warning Partial support
+Provides the number of milliseconds from system boot, instead of the number of milliseconds from app startup.
+:::
+
+See [documentation in MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now).
diff --git a/website/versioned_docs/version-0.86/global-process.md b/website/versioned_docs/version-0.86/global-process.md
new file mode 100644
index 00000000000..22c1779e238
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-process.md
@@ -0,0 +1,10 @@
+---
+id: global-process
+title: process
+---
+
+:::warning
+🚧 This page is work in progress.
+:::
+
+The global `process` object, as defined in Node.js.
diff --git a/website/versioned_docs/version-0.86/global-queueMicrotask.md b/website/versioned_docs/version-0.86/global-queueMicrotask.md
new file mode 100644
index 00000000000..cddaaa89110
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-queueMicrotask.md
@@ -0,0 +1,10 @@
+---
+id: global-queueMicrotask
+title: queueMicrotask
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/queueMicrotask) for more information.
+:::
+
+The global `queueMicrotask` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-requestAnimationFrame.md b/website/versioned_docs/version-0.86/global-requestAnimationFrame.md
new file mode 100644
index 00000000000..3ce63350417
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-requestAnimationFrame.md
@@ -0,0 +1,10 @@
+---
+id: global-requestAnimationFrame
+title: requestAnimationFrame
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame) for more information.
+:::
+
+The global `requestAnimationFrame` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-requestIdleCallback.md b/website/versioned_docs/version-0.86/global-requestIdleCallback.md
new file mode 100644
index 00000000000..acaff5d84fa
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-requestIdleCallback.md
@@ -0,0 +1,10 @@
+---
+id: global-requestIdleCallback
+title: requestIdleCallback
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback) for more information.
+:::
+
+The global `requestIdleCallback` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-self.md b/website/versioned_docs/version-0.86/global-self.md
new file mode 100644
index 00000000000..9e8aab5cf21
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-self.md
@@ -0,0 +1,8 @@
+---
+id: global-self
+title: self
+---
+
+[`self`](https://developer.mozilla.org/en-US/docs/Web/API/Window/self) is an alias for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), as defined in Web specifications.
+
+The use of `globalThis` is recommended over `self`.
diff --git a/website/versioned_docs/version-0.86/global-setInterval.md b/website/versioned_docs/version-0.86/global-setInterval.md
new file mode 100644
index 00000000000..b8dd2a7a258
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-setInterval.md
@@ -0,0 +1,10 @@
+---
+id: global-setInterval
+title: setInterval
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval) for more information.
+:::
+
+The global `setInterval` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-setTimeout.md b/website/versioned_docs/version-0.86/global-setTimeout.md
new file mode 100644
index 00000000000..14188b28288
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-setTimeout.md
@@ -0,0 +1,10 @@
+---
+id: global-setTimeout
+title: setTimeout
+---
+
+:::warning
+🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout) for more information.
+:::
+
+The global `setTimeout` function, as defined in Web specifications.
diff --git a/website/versioned_docs/version-0.86/global-window.md b/website/versioned_docs/version-0.86/global-window.md
new file mode 100644
index 00000000000..ea0355a688b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/global-window.md
@@ -0,0 +1,8 @@
+---
+id: global-window
+title: window
+---
+
+[`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) is an alias for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), as defined in Web specifications.
+
+The use of `globalThis` is recommended over `window`.
diff --git a/website/versioned_docs/version-0.86/handling-text-input.md b/website/versioned_docs/version-0.86/handling-text-input.md
new file mode 100644
index 00000000000..6db00cae840
--- /dev/null
+++ b/website/versioned_docs/version-0.86/handling-text-input.md
@@ -0,0 +1,48 @@
+---
+id: handling-text-input
+title: Handling Text Input
+---
+
+[`TextInput`](textinput#content) is a [Core Component](intro-react-native-components) that allows the user to enter text. It has an `onChangeText` prop that takes a function to be called every time the text changed, and an `onSubmitEditing` prop that takes a function to be called when the text is submitted.
+
+For example, let's say that as the user types, you're translating their words into a different language. In this new language, every single word is written the same way: 🍕. So the sentence "Hello there Bob" would be translated as "🍕 🍕 🍕".
+
+```SnackPlayer name=Handling%20Text%20Input
+import React, {useState} from 'react';
+import {Text, TextInput, View} from 'react-native';
+
+const PizzaTranslator = () => {
+ const [text, setText] = useState('');
+ return (
+
+ setText(newText)}
+ defaultValue={text}
+ style={{
+ height: 40,
+ padding: 5,
+ marginHorizontal: 8,
+ borderWidth: 1,
+ }}
+ />
+
+ {text
+ .split(' ')
+ .map(word => word && '🍕')
+ .join(' ')}
+
+
+ );
+};
+
+export default PizzaTranslator;
+```
+
+In this example, we store `text` in the state, because it changes over time.
+
+There are a lot more things you might want to do with a text input. For example, you could validate the text inside while the user types. For more detailed examples, see the [React docs on controlled components](https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable), or the [reference docs for TextInput](textinput.md).
+
+A `TextInput` is one of many ways for the user to interact with your app. For examples of other ways to handle input, see the documentation on [how to handle touches](handling-touches.md).
+
+Now, let's take a look at [ScrollView](using-a-scrollview), another Core Component.
diff --git a/website/versioned_docs/version-0.86/handling-touches.md b/website/versioned_docs/version-0.86/handling-touches.md
new file mode 100644
index 00000000000..612287f6e10
--- /dev/null
+++ b/website/versioned_docs/version-0.86/handling-touches.md
@@ -0,0 +1,181 @@
+---
+id: handling-touches
+title: Handling Touches
+---
+
+Users interact with mobile apps mainly through touch. They can use a combination of gestures, such as tapping on a button, scrolling a list, or zooming on a map. React Native provides components to handle all sorts of common gestures, as well as a comprehensive [gesture responder system](gesture-responder-system.md) to allow for more advanced gesture recognition, but the one component you will most likely be interested in is the basic Button.
+
+## Displaying a basic button
+
+[Button](button.md) provides a basic button component that is rendered nicely on all platforms. The minimal example to display a button looks like this:
+
+```tsx
+ {
+ console.log('You tapped the button!');
+ }}
+ title="Press Me"
+/>
+```
+
+This will render a blue label on iOS, and a blue rounded rectangle with light text on Android. Pressing the button will call the "onPress" function, which in this case displays an alert popup. If you like, you can specify a "color" prop to change the color of your button.
+
+
+
+Go ahead and play around with the `Button` component using the example below. You can select which platform your app is previewed in by clicking on the toggle in the bottom right and then clicking on "Tap to Play" to preview the app.
+
+```SnackPlayer name=Button%20Basics
+import React from 'react';
+import {Alert, Button, StyleSheet, View} from 'react-native';
+
+const ButtonBasics = () => {
+ const onPress = () => {
+ Alert.alert('You tapped the button!');
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ buttonContainer: {
+ margin: 20,
+ },
+ alternativeLayoutButtonContainer: {
+ margin: 20,
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ },
+});
+
+export default ButtonBasics;
+```
+
+## Touchables
+
+If the basic button doesn't look right for your app, you can build your own button using any of the "Touchable" components provided by React Native. These components provide the capability to capture tapping gestures and can display feedback when a gesture is recognized. However, these components do not provide any default styling, so you will need to do a bit of work to get them looking nice in your app.
+
+Which "Touchable" component you use will depend on what kind of feedback you want to provide:
+
+- Generally, you can use [**TouchableHighlight**](touchablehighlight.md) anywhere you would use a button or link on web. The view's background will be darkened when the user presses down on the button.
+
+- You may consider using [**TouchableNativeFeedback**](touchablenativefeedback.md) on Android to display ink surface reaction ripples that respond to the user's touch.
+
+- [**TouchableOpacity**](touchableopacity.md) can be used to provide feedback by reducing the opacity of the button, allowing the background to be seen through while the user is pressing down.
+
+- If you need to handle a tap gesture but you don't want any feedback to be displayed, use [**TouchableWithoutFeedback**](touchablewithoutfeedback.md).
+
+In some cases, you may want to detect when a user presses and holds a view for a set amount of time. These long presses can be handled by passing a function to the `onLongPress` props of any of the "Touchable" components.
+
+Let's see all of these in action:
+
+```SnackPlayer name=Touchables
+import React from 'react';
+import {
+ Alert,
+ Platform,
+ StyleSheet,
+ Text,
+ TouchableHighlight,
+ TouchableOpacity,
+ TouchableNativeFeedback,
+ TouchableWithoutFeedback,
+ View,
+} from 'react-native';
+
+const Touchables = () => {
+ const onPressButton = () => {
+ Alert.alert('You tapped the button!');
+ };
+
+ const onLongPressButton = () => {
+ Alert.alert('You long-pressed the button!');
+ };
+
+ return (
+
+
+
+ TouchableHighlight
+
+
+
+
+ TouchableOpacity
+
+
+
+
+
+ TouchableNativeFeedback{' '}
+ {Platform.OS !== 'android' ? '(Android only)' : ''}
+
+
+
+
+
+ TouchableWithoutFeedback
+
+
+
+
+ Touchable with Long Press
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ paddingTop: 60,
+ alignItems: 'center',
+ },
+ button: {
+ marginBottom: 30,
+ width: 260,
+ alignItems: 'center',
+ backgroundColor: '#2196F3',
+ },
+ buttonText: {
+ textAlign: 'center',
+ padding: 20,
+ color: 'white',
+ },
+});
+
+export default Touchables;
+```
+
+## Scrolling and swiping
+
+Gestures commonly used on devices with touchable screens include swipes and pans. These allow the user to scroll through a list of items, or swipe through pages of content. For these, check out the [ScrollView](scrollview.md) Core Component.
+
+## Known issues
+
+- [react-native#29308](https://github.com/facebook/react-native/issues/29308#issuecomment-792864162): The touch area never extends past the parent view bounds and on Android negative margin is not supported.
diff --git a/website/versioned_docs/version-0.86/headless-js-android.md b/website/versioned_docs/version-0.86/headless-js-android.md
new file mode 100644
index 00000000000..c0b598254a3
--- /dev/null
+++ b/website/versioned_docs/version-0.86/headless-js-android.md
@@ -0,0 +1,396 @@
+---
+id: headless-js-android
+title: Headless JS
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
+import constants from '@site/core/TabsConstants';
+
+Headless JS is a way to run tasks in JavaScript while your app is in the background. It can be used, for example, to sync fresh data, handle push notifications, or play music.
+
+## The JS API
+
+A task is an async function that you register on `AppRegistry`, similar to registering React applications:
+
+```tsx
+import {AppRegistry} from 'react-native';
+AppRegistry.registerHeadlessTask('SomeTaskName', () =>
+ require('SomeTaskName'),
+);
+```
+
+Then, in `SomeTaskName.js`:
+
+```tsx
+module.exports = async taskData => {
+ // do stuff
+};
+```
+
+You can do anything in your task such as network requests, timers and so on, as long as it doesn't touch UI. Once your task completes (i.e. the promise is resolved), React Native will go into "paused" mode (unless there are other tasks running, or there is a foreground app).
+
+## The Platform API
+
+Yes, this does still require some native code, but it's pretty thin. You need to extend `HeadlessJsTaskService` and override `getTaskConfig`, e.g.:
+
+
+
+
+```java
+package com.your_application_name;
+
+import android.content.Intent;
+import android.os.Bundle;
+import com.facebook.react.HeadlessJsTaskService;
+import com.facebook.react.bridge.Arguments;
+import com.facebook.react.jstasks.HeadlessJsTaskConfig;
+import javax.annotation.Nullable;
+
+public class MyTaskService extends HeadlessJsTaskService {
+
+ @Override
+ protected @Nullable HeadlessJsTaskConfig getTaskConfig(Intent intent) {
+ Bundle extras = intent.getExtras();
+ if (extras != null) {
+ return new HeadlessJsTaskConfig(
+ "SomeTaskName",
+ Arguments.fromBundle(extras),
+ 5000, // timeout in milliseconds for the task
+ false // optional: defines whether or not the task is allowed in foreground. Default is false
+ );
+ }
+ return null;
+ }
+}
+```
+
+
+
+
+```kotlin
+package com.your_application_name;
+
+import android.content.Intent
+import com.facebook.react.HeadlessJsTaskService
+import com.facebook.react.bridge.Arguments
+import com.facebook.react.jstasks.HeadlessJsTaskConfig
+
+class MyTaskService : HeadlessJsTaskService() {
+ override fun getTaskConfig(intent: Intent?): HeadlessJsTaskConfig? {
+ return intent.extras?.let {
+ HeadlessJsTaskConfig(
+ "SomeTaskName",
+ Arguments.fromBundle(it),
+ 5000, // timeout for the task
+ false // optional: defines whether or not the task is allowed in foreground.
+ // Default is false
+ )
+ }
+ }
+}
+
+```
+
+
+
+
+Then add the service to your `AndroidManifest.xml` file inside the `application` tag:
+
+```xml
+
+```
+
+Now, whenever you [start your service][0], e.g. as a periodic task or in response to some system event / broadcast, JS will spin up, run your task, then spin down.
+
+Example:
+
+
+
+
+```java
+Intent service = new Intent(getApplicationContext(), MyTaskService.class);
+Bundle bundle = new Bundle();
+
+bundle.putString("foo", "bar");
+service.putExtras(bundle);
+
+getApplicationContext().startForegroundService(service);
+```
+
+
+
+
+```kotlin
+val service = Intent(applicationContext, MyTaskService::class.java)
+val bundle = Bundle()
+
+bundle.putString("foo", "bar")
+
+service.putExtras(bundle)
+
+applicationContext.startForegroundService(service)
+```
+
+
+
+
+## Retries
+
+By default, the headless JS task will not perform any retries. In order to do so, you need to create a `HeadlessJsRetryPolicy` and throw a specific `Error`.
+
+`LinearCountingRetryPolicy` is an implementation of `HeadlessJsRetryPolicy` that allows you to specify a maximum number of retries with a fixed delay between each attempt. If that does not suit your needs then you can implement your own `HeadlessJsRetryPolicy`. These policies can be passed as an extra argument to the `HeadlessJsTaskConfig` constructor, e.g.
+
+
+
+
+```java
+HeadlessJsRetryPolicy retryPolicy = new LinearCountingRetryPolicy(
+ 3, // Max number of retry attempts
+ 1000 // Delay between each retry attempt
+);
+
+return new HeadlessJsTaskConfig(
+ 'SomeTaskName',
+ Arguments.fromBundle(extras),
+ 5000,
+ false,
+ retryPolicy
+);
+```
+
+
+
+
+```kotlin
+val retryPolicy: HeadlessJsTaskRetryPolicy =
+ LinearCountingRetryPolicy(
+ 3, // Max number of retry attempts
+ 1000 // Delay between each retry attempt
+ )
+
+return HeadlessJsTaskConfig("SomeTaskName", Arguments.fromBundle(extras), 5000, false, retryPolicy)
+```
+
+
+
+
+A retry attempt will only be made when a specific `Error` is thrown. Inside a headless JS task, you can import the error and throw it when a retry attempt is required.
+
+Example:
+
+```tsx
+import {HeadlessJsTaskError} from 'HeadlessJsTask';
+
+module.exports = async taskData => {
+ const condition = ...;
+ if (!condition) {
+ throw new HeadlessJsTaskError();
+ }
+};
+```
+
+If you wish all errors to cause a retry attempt, you will need to catch them and throw the above error.
+
+## Caveats
+
+- By default, your app will crash if you try to run a task while the app is in the foreground. This is to prevent developers from shooting themselves in the foot by doing a lot of work in a task and slowing the UI. You can pass a fourth `boolean` argument to control this behaviour.
+- If you start your service from a `BroadcastReceiver`, make sure to call `HeadlessJsTaskService.acquireWakeLockNow()` before returning from `onReceive()`.
+
+## Example Usage
+
+Service can be started from Java API. First you need to decide when the service should be started and implement your solution accordingly. Here is an example that reacts to network connection change.
+
+Following lines shows part of Android manifest file for registering broadcast receiver.
+
+```xml
+
+
+
+
+
+```
+
+Broadcast receiver then handles intent that was broadcasted in onReceive function. This is a great place to check whether your app is on foreground or not. If app is not on foreground we can prepare our intent to be started, with no information or additional information bundled using `putExtra` (keep in mind bundle can handle only parcelable values). In the end service is started and wakelock is acquired.
+
+
+
+
+```java
+import android.app.ActivityManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.net.ConnectivityManager;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkInfo;
+import android.os.Build;
+
+import com.facebook.react.HeadlessJsTaskService;
+
+public class NetworkChangeReceiver extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(final Context context, final Intent intent) {
+ /**
+ This part will be called every time network connection is changed
+ e.g. Connected -> Not Connected
+ **/
+ if (!isAppOnForeground((context))) {
+ /**
+ We will start our service and send extra info about
+ network connections
+ **/
+ boolean hasInternet = isNetworkAvailable(context);
+ Intent serviceIntent = new Intent(context, MyTaskService.class);
+ serviceIntent.putExtra("hasInternet", hasInternet);
+ context.startForegroundService(serviceIntent);
+ HeadlessJsTaskService.acquireWakeLockNow(context);
+ }
+ }
+
+ private boolean isAppOnForeground(Context context) {
+ /**
+ We need to check if app is in foreground otherwise the app will crash.
+ https://stackoverflow.com/questions/8489993/check-android-application-is-in-foreground-or-not
+ **/
+ ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+ List appProcesses =
+ activityManager.getRunningAppProcesses();
+ if (appProcesses == null) {
+ return false;
+ }
+ final String packageName = context.getPackageName();
+ for (ActivityManager.RunningAppProcessInfo appProcess : appProcesses) {
+ if (appProcess.importance ==
+ ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND &&
+ appProcess.processName.equals(packageName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static boolean isNetworkAvailable(Context context) {
+ ConnectivityManager cm = (ConnectivityManager)
+ context.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ Network networkCapabilities = cm.getActiveNetwork();
+
+ if(networkCapabilities == null) {
+ return false;
+ }
+
+ NetworkCapabilities actNw = cm.getNetworkCapabilities(networkCapabilities);
+
+ if(actNw == null) {
+ return false;
+ }
+
+ if(actNw.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) || actNw.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) || actNw.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ // deprecated in API level 29
+ NetworkInfo netInfo = cm.getActiveNetworkInfo();
+ return (netInfo != null && netInfo.isConnected());
+ }
+}
+```
+
+
+
+
+```kotlin
+import android.app.ActivityManager
+import android.app.ActivityManager.RunningAppProcessInfo
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.net.ConnectivityManager
+import android.net.NetworkCapabilities
+import android.os.Build
+import com.facebook.react.HeadlessJsTaskService
+
+class NetworkChangeReceiver : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent?) {
+ /**
+ * This part will be called every time network connection is changed e.g. Connected -> Not
+ * Connected
+ */
+ if (!isAppOnForeground(context)) {
+ /** We will start our service and send extra info about network connections */
+ val hasInternet = isNetworkAvailable(context)
+ val serviceIntent = Intent(context, MyTaskService::class.java)
+ serviceIntent.putExtra("hasInternet", hasInternet)
+ context.startForegroundService(serviceIntent)
+ HeadlessJsTaskService.acquireWakeLockNow(context)
+ }
+ }
+
+ private fun isAppOnForeground(context: Context): Boolean {
+ /**
+ * We need to check if app is in foreground otherwise the app will crash.
+ * https://stackoverflow.com/questions/8489993/check-android-application-is-in-foreground-or-not
+ */
+ val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
+ val appProcesses = activityManager.runningAppProcesses ?: return false
+ val packageName: String = context.getPackageName()
+ for (appProcess in appProcesses) {
+ if (appProcess.importance == RunningAppProcessInfo.IMPORTANCE_FOREGROUND &&
+ appProcess.processName == packageName
+ ) {
+ return true
+ }
+ }
+ return false
+ }
+
+ companion object {
+ fun isNetworkAvailable(context: Context): Boolean {
+ val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+ var result = false
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ val networkCapabilities = cm.activeNetwork ?: return false
+
+ val actNw = cm.getNetworkCapabilities(networkCapabilities) ?: return false
+
+ result =
+ when {
+ actNw.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) -> true
+ actNw.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR) -> true
+ actNw.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET) -> true
+ else -> false
+ }
+
+ return result
+ } else {
+ cm.run {
+ // deprecated in API level 29
+ cm.activeNetworkInfo?.run {
+ result =
+ when (type) {
+ ConnectivityManager.TYPE_WIFI -> true
+ ConnectivityManager.TYPE_MOBILE -> true
+ ConnectivityManager.TYPE_ETHERNET -> true
+ else -> false
+ }
+ }
+ }
+ }
+ return result
+ }
+ }
+}
+
+```
+
+
+
+
+[0]: https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)
diff --git a/website/versioned_docs/version-0.86/height-and-width.md b/website/versioned_docs/version-0.86/height-and-width.md
new file mode 100644
index 00000000000..485667831cd
--- /dev/null
+++ b/website/versioned_docs/version-0.86/height-and-width.md
@@ -0,0 +1,121 @@
+---
+id: height-and-width
+title: Height and Width
+---
+
+A component's height and width determine its size on the screen.
+
+## Fixed Dimensions
+
+The general way to set the dimensions of a component is by adding a fixed `width` and `height` to style. All dimensions in React Native are unitless, and represent density-independent pixels.
+
+```SnackPlayer name=Height%20and%20Width
+import React from 'react';
+import {View} from 'react-native';
+
+const FixedDimensionsBasics = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default FixedDimensionsBasics;
+```
+
+Setting dimensions this way is common for components whose size should always be fixed to a number of points and not calculated based on screen size.
+
+:::caution
+There is no universal mapping from points to physical units of measurement. This means that a component with fixed dimensions might not have the same physical size, across different devices and screen sizes. However, this difference is unnoticeable for most use cases.
+:::
+
+## Flex Dimensions
+
+Use `flex` in a component's style to have the component expand and shrink dynamically based on available space. Normally you will use `flex: 1`, which tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the `flex` given, the higher the ratio of space a component will take compared to its siblings.
+
+:::info
+A component can only expand to fill available space if its parent has dimensions greater than `0`. If a parent does not have either a fixed `width` and `height` or `flex`, the parent will have dimensions of `0` and the `flex` children will not be visible.
+:::
+
+```SnackPlayer name=Flex%20Dimensions
+import React from 'react';
+import {View} from 'react-native';
+
+const FlexDimensionsBasics = () => {
+ return (
+ // Try removing the `flex: 1` on the parent View.
+ // The parent will not have dimensions, so the children can't expand.
+ // What if you add `height: 300` instead of `flex: 1`?
+
+
+
+
+
+ );
+};
+
+export default FlexDimensionsBasics;
+```
+
+After you can control a component's size, the next step is to [learn how to lay it out on the screen](flexbox.md).
+
+## Percentage Dimensions
+
+If you want to fill a certain portion of the screen, but you _don't_ want to use the `flex` layout, you _can_ use **percentage values** in the component's style. Similar to flex dimensions, percentage dimensions require parent with a defined size.
+
+```SnackPlayer name=Percentage%20Dimensions
+import React from 'react';
+import {View} from 'react-native';
+
+const PercentageDimensionsBasics = () => {
+ // Try removing the `height: '100%'` on the parent View.
+ // The parent will not have dimensions, so the children can't expand.
+ return (
+
+
+
+
+
+ );
+};
+
+export default PercentageDimensionsBasics;
+```
diff --git a/website/versioned_docs/version-0.86/hermes.md b/website/versioned_docs/version-0.86/hermes.md
new file mode 100644
index 00000000000..ba909ed0255
--- /dev/null
+++ b/website/versioned_docs/version-0.86/hermes.md
@@ -0,0 +1,95 @@
+---
+id: hermes
+title: Using Hermes
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+
+
+
+
+[Hermes](https://hermesengine.dev) is an open-source JavaScript engine optimized for React Native. For many apps, using Hermes will result in improved start-up time, decreased memory usage, and smaller app size when compared to JavaScriptCore.
+Hermes is used by default by React Native and no additional configuration is required to enable it.
+
+## Bundled Hermes
+
+React Native comes with a **bundled version** of Hermes.
+We are building a version of Hermes for you whenever we release a new version of React Native. This will make sure you're consuming a version of Hermes which is fully compatible with the version of React Native you're using.
+
+This change is fully transparent to users of React Native. You can still disable Hermes using the command described in this page.
+You can [read more about the technical implementation on this page](/architecture/bundled-hermes).
+
+## Confirming Hermes is in use
+
+If you've recently created a new app from scratch, you should see if Hermes is enabled in the welcome view:
+
+
+
+
+
+A `HermesInternal` global variable will be available in JavaScript that can be used to verify that Hermes is in use:
+
+```jsx
+const isHermes = () => !!global.HermesInternal;
+```
+
+:::caution
+If you are using a non-standard way of loading the JS bundle, it is possible that the `HermesInternal` variable is available but you aren't using the highly optimised pre-compiled bytecode.
+Confirm that you are using the `.hbc` file and also benchmark the before/after as detailed below.
+:::
+
+To see the benefits of Hermes, try making a release build/deployment of your app to compare. For example; from the root of your project:
+
+
+
+
+[//]: # 'Android'
+
+
+
+
+```shell
+npm run android -- --mode="release"
+```
+
+
+
+
+```shell
+yarn android --mode release
+```
+
+
+
+
+
+
+
+[//]: # 'iOS'
+
+
+
+
+```shell
+npm run ios -- --mode="Release"
+```
+
+
+
+
+```shell
+yarn ios --mode Release
+```
+
+
+
+
+
+
+
+This will compile JavaScript to Hermes Bytecode during build time which will improve your app's startup speed on device.
+
+## Switching back to JavaScriptCore
+
+React Native also supports using JavaScriptCore as the [JavaScript engine](javascript-environment). Follow the instructions [from the community repository](https://github.com/react-native-community/javascriptcore) to opt-out of Hermes.
diff --git a/website/versioned_docs/version-0.86/i18nmanager.md b/website/versioned_docs/version-0.86/i18nmanager.md
new file mode 100644
index 00000000000..80ccd2ccd72
--- /dev/null
+++ b/website/versioned_docs/version-0.86/i18nmanager.md
@@ -0,0 +1,169 @@
+---
+id: i18nmanager
+title: I18nManager
+---
+
+# I18nManager
+
+The `I18nManager` module provides utilities for managing Right-to-Left (RTL) layout support for languages like Arabic, Hebrew, and others. It provides methods to control RTL behavior and check the current layout direction.
+
+## Examples
+
+### Change positions and animations based on RTL
+
+If you absolutely position elements to align with other flexbox elements, they may not align in RTL languages. Using `isRTL` can be used to adjust alignment or animations.
+
+```SnackPlayer name=I18nManager%20Change%20Absolute%20Positions%20And%20Animations
+import React from 'react';
+import {I18nManager, Text, View} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ // Change to `true` to see the effect in a non-RTL language
+ const isRTL = I18nManager.isRTL;
+ return (
+
+
+
+ {isRTL ? Back > : < Back}
+
+
+
+ );
+};
+
+export default App;
+```
+
+### During Development
+
+```SnackPlayer name=I18nManager%20During%20Development
+import React, {useState} from 'react';
+import {Alert, I18nManager, StyleSheet, Switch, Text, View} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [rtl, setRTL] = useState(I18nManager.isRTL);
+ return (
+
+
+
+
+ Force RTL in Development:
+ {
+ setRTL(value);
+ I18nManager.forceRTL(value);
+ Alert.alert(
+ 'Reload this page',
+ 'Please reload this page to change the UI direction! ' +
+ 'All examples in this app will be affected. ' +
+ 'Check them out to see what they look like in RTL layout.',
+ );
+ }}
+ />
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ padding: 20,
+ },
+ forceRtl: {
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+# Reference
+
+## Properties
+
+### `isRTL`
+
+```typescript
+static isRTL: boolean;
+```
+
+A boolean value indicating whether the app is currently in RTL layout mode.
+
+The value of `isRTL` is determined by the following logic:
+
+- If `forceRTL` is `true`, `isRTL` returns `true`
+- If `allowRTL` is `false`, `isRTL` returns `false`
+- Otherwise, `isRTL` will be `true` given the following:
+ - **iOS:**
+ - The user-preferred language on the device is an RTL language
+ - The application-defined localizations include the user-chosen language (as defined in the Xcode project file (`knownRegions = (...)`)
+ - **Android:**
+ - The user-preferred language on the device is an RTL language
+ - The application's `AndroidManifest.xml` defines `android:supportsRTL="true"` on the `` element
+
+### `doLeftAndRightSwapInRTL`
+
+```typescript
+static doLeftAndRightSwapInRTL: boolean;
+```
+
+A boolean value indicating whether left and right style properties should be automatically swapped when in RTL mode. When enabled, left becomes right and right becomes left in RTL layouts.
+
+## Methods
+
+### `allowRTL()`
+
+```typescript
+static allowRTL: (allowRTL: boolean) => void;
+```
+
+Enables or disables RTL layout support for the application.
+
+**Parameters:**
+
+- `allowRTL` (boolean): Whether to allow RTL layout
+
+**Important Notes:**
+
+- Changes take effect on the next application start, not immediately
+- This setting is persisted across app restarts
+
+### `forceRTL()`
+
+```typescript
+static forceRTL: (forced: boolean) => void;
+```
+
+Forces the app to use RTL layout regardless of the device language settings. This is primarily useful for testing RTL layouts during development.
+
+Avoid forcing RTL in production apps as it requires a full app restart to take effect, which makes for a poor user-experience.
+
+**Parameters:**
+
+- `forced` (boolean): Whether to force RTL layout
+
+**Important Notes:**
+
+- Changes take full effect on the next application start, not immediately
+- The setting is persisted across app restarts
+- Only meant for development and testing. In production, you should either disallow RTL fully or handle it appropriately (see `isRTL`)
+
+### `swapLeftAndRightInRTL()`
+
+```typescript
+static swapLeftAndRightInRTL: (swapLeftAndRight: boolean) => void;
+```
+
+Swap left and right style properties in RTL mode. When enabled, left becomes right and right becomes left in RTL layouts. Does not affect the value of `isRTL`.
diff --git a/website/versioned_docs/version-0.86/image-style-props.md b/website/versioned_docs/version-0.86/image-style-props.md
new file mode 100644
index 00000000000..efa0dc725e1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/image-style-props.md
@@ -0,0 +1,370 @@
+---
+id: image-style-props
+title: Image Style Props
+---
+
+## Examples
+
+### Image Resize Mode
+
+```SnackPlayer name=Image%20Resize%20Modes%20Example
+import React from 'react';
+import {View, Image, Text, StyleSheet, ScrollView} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const asset = require('@expo/snack-static/react-native-logo.png');
+
+const DisplayAnImageWithStyle = () => (
+
+
+
+
+
+ resizeMode : cover
+
+
+
+ resizeMode : contain
+
+
+
+ resizeMode : stretch
+
+
+
+ resizeMode : repeat
+
+
+
+ resizeMode : center
+
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ scrollView: {
+ padding: 12,
+ alignItems: 'center',
+ gap: 16,
+ },
+ image: {
+ borderWidth: 1,
+ borderColor: 'red',
+ height: 100,
+ width: 200,
+ },
+ text: {
+ textAlign: 'center',
+ marginBottom: 12,
+ },
+});
+
+export default DisplayAnImageWithStyle;
+```
+
+### Image Border
+
+```SnackPlayer name=Style%20BorderWidth%20and%20BorderColor%20Example
+import React from 'react';
+import {Image, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DisplayAnImageWithStyle = () => (
+
+
+
+ borderColor & borderWidth
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ flexDirection: 'column',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default DisplayAnImageWithStyle;
+```
+
+### Image Border Radius
+
+```SnackPlayer name=Style%20Border%20Radius%20Example
+import React from 'react';
+import {View, Image, StyleSheet, Text, ScrollView} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const asset = require('@expo/snack-static/react-native-logo.png');
+
+const DisplayAnImageWithStyle = () => (
+
+
+
+
+
+ borderTopRightRadius
+
+
+
+ borderBottomRightRadius
+
+
+
+ borderBottomLeftRadius
+
+
+
+ borderTopLeftRadius
+
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ scrollView: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ image: {
+ borderWidth: 1,
+ borderColor: 'red',
+ height: 100,
+ width: 200,
+ },
+});
+
+export default DisplayAnImageWithStyle;
+```
+
+### Image Tint
+
+```SnackPlayer name=Style%20tintColor%20Function%20Component
+import React from 'react';
+import {Image, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DisplayAnImageWithStyle = () => (
+
+
+
+ tintColor
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default DisplayAnImageWithStyle;
+```
+
+# Reference
+
+## Props
+
+### `backfaceVisibility`
+
+The property defines whether or not the back face of a rotated image should be visible.
+
+| Type | Default |
+| ----------------------------- | ----------- |
+| enum(`'visible'`, `'hidden'`) | `'visible'` |
+
+---
+
+### `backgroundColor`
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `borderBottomLeftRadius`
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `borderBottomRightRadius`
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `borderColor`
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `borderRadius`
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `borderTopLeftRadius`
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `borderTopRightRadius`
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `borderWidth`
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `opacity`
+
+Set an opacity value for the image. The number should be in the range from `0.0` to `1.0`.
+
+| Type | Default |
+| ------ | ------- |
+| number | `1.0` |
+
+---
+
+### `overflow`
+
+| Type | Default |
+| ----------------------------- | ----------- |
+| enum(`'visible'`, `'hidden'`) | `'visible'` |
+
+---
+
+### `overlayColor`
Android
+
+When the image has rounded corners, specifying an overlayColor will cause the remaining space in the corners to be filled with a solid color. This is useful in cases which are not supported by the Android implementation of rounded corners:
+
+- Certain resize modes, such as `'contain'`
+- Animated GIFs
+
+A typical way to use this prop is with images displayed on a solid background and setting the `overlayColor` to the same color as the background.
+
+For details of how this works under the hood, see [Fresco documentation](https://frescolib.org/docs/rounded-corners-and-circles.html).
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `resizeMode`
+
+Determines how to resize the image when the frame doesn't match the raw image dimensions. Defaults to `cover`.
+
+- `cover`: Scale the image uniformly (maintain the image's aspect ratio) so that:
+ - Both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding)
+ - At least one dimension of the scaled image will be equal to the corresponding dimension of the view (minus padding)
+
+- `contain`: Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
+
+- `stretch`: Scale width and height independently, This may change the aspect ratio of the src.
+
+- `repeat`: Repeat the image to cover the frame of the view. The image will keep its size and aspect ratio, unless it is larger than the view, in which case it will be scaled down uniformly so that it is contained in the view.
+
+- `center`: Center the image in the view along both dimensions. If the image is larger than the view, scale it down uniformly so that it is contained in the view.
+
+| Type | Default |
+| ----------------------------------------------------------------- | --------- |
+| enum(`'cover'`, `'contain'`, `'stretch'`, `'repeat'`, `'center'`) | `'cover'` |
+
+---
+
+### `objectFit`
+
+Determines how to resize the image when the frame doesn't match the raw image dimensions.
+
+| Type | Default |
+| ------------------------------------------------------ | --------- |
+| enum(`'cover'`, `'contain'`, `'fill'`, `'scale-down'`) | `'cover'` |
+
+---
+
+### `tintColor`
+
+Changes the color of all the non-transparent pixels to the tintColor.
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
diff --git a/website/versioned_docs/version-0.86/image.md b/website/versioned_docs/version-0.86/image.md
new file mode 100644
index 00000000000..5f6a2a5b1ad
--- /dev/null
+++ b/website/versioned_docs/version-0.86/image.md
@@ -0,0 +1,652 @@
+---
+id: image
+title: Image
+---
+
+A React component for displaying different types of images, including network images, static resources, temporary local images, and images from local disk, such as the camera roll.
+
+This example shows fetching and displaying an image from local storage as well as one from network and even from data provided in the `'data:'` uri scheme.
+
+:::note
+For network and data images, you will need to manually specify the dimensions of your image!
+:::
+
+## Examples
+
+```SnackPlayer name=Image%20Example
+import React from 'react';
+import {Image, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ tinyLogo: {
+ width: 50,
+ height: 50,
+ },
+ logo: {
+ width: 66,
+ height: 58,
+ },
+});
+
+const DisplayAnImage = () => (
+
+
+
+
+
+
+
+);
+
+export default DisplayAnImage;
+```
+
+You can also add `style` to an image:
+
+```SnackPlayer name=Styled%20Image%20Example
+import React from 'react';
+import {Image, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ stretch: {
+ width: 50,
+ height: 200,
+ resizeMode: 'stretch',
+ },
+});
+
+const DisplayAnImageWithStyle = () => (
+
+
+
+
+
+);
+
+export default DisplayAnImageWithStyle;
+```
+
+## GIF and WebP support on Android
+
+When building your own native code, GIF and WebP are not supported by default on Android.
+
+You will need to add some optional modules in `android/app/build.gradle`, depending on the needs of your app.
+
+```groovy
+dependencies {
+ // If your app supports Android versions before Ice Cream Sandwich (API level 14)
+ implementation 'com.facebook.fresco:animated-base-support:1.3.0'
+
+ // For animated GIF support
+ implementation 'com.facebook.fresco:animated-gif:3.6.0'
+
+ // For WebP support, including animated WebP
+ implementation 'com.facebook.fresco:animated-webp:3.6.0'
+ implementation 'com.facebook.fresco:webpsupport:3.6.0'
+
+ // For WebP support, without animations
+ implementation 'com.facebook.fresco:webpsupport:3.6.0'
+}
+```
+
+:::note
+The version listed above may not be updated in time. Please check [`packages/react-native/gradle/libs.versions.toml`](https://github.com/facebook/react-native/blob/main/packages/react-native/gradle/libs.versions.toml) in the main repo to see which fresco version is being used in a specific tagged version.
+:::
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view#props).
+
+---
+
+### `accessible`
+
+When true, indicates the image is an accessibility element.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `accessibilityLabel`
+
+The text that's read by the screen reader when the user interacts with the image.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `alt`
+
+A string that defines an alternative text description of the image, which will be read by the screen reader when the user interacts with it. Using this will automatically mark this element as accessible.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `blurRadius`
+
+blurRadius: the blur radius of the blur filter added to the image.
+
+| Type |
+| ------ |
+| number |
+
+:::tip
+On IOS, you will need to increase `blurRadius` by more than `5`.
+:::
+
+---
+
+### `capInsets`
iOS
+
+When the image is resized, the corners of the size specified by `capInsets` will stay a fixed size, but the center content and borders of the image will be stretched. This is useful for creating resizable rounded buttons, shadows, and other resizable assets. More info in the [official Apple documentation](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/index.html#//apple_ref/occ/instm/UIImage/resizableImageWithCapInsets).
+
+| Type |
+| ------------ |
+| [Rect](rect) |
+
+---
+
+### `crossOrigin`
+
+A string of a keyword specifying the CORS mode to use when fetching the image resource. It works similar to crossorigin attribute in HTML.
+
+- `anonymous`: No exchange of user credentials in the image request.
+- `use-credentials`: Sets `Access-Control-Allow-Credentials` header value to `true` in the image request.
+
+| Type | Default |
+| ---------------------------------------- | ------------- |
+| enum(`'anonymous'`, `'use-credentials'`) | `'anonymous'` |
+
+---
+
+### `defaultSource`
+
+A static image to display while loading the image source.
+
+| Type |
+| -------------------------------- |
+| [ImageSource](image#imagesource) |
+
+:::note
+On Android, the default source prop is ignored on debug builds.
+:::
+
+---
+
+### `fadeDuration`
Android
+
+Fade animation duration in milliseconds.
+
+| Type | Default |
+| ------ | ------- |
+| number | `300` |
+
+---
+
+### `height`
+
+Height of the image component.
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `loadingIndicatorSource`
+
+Similarly to `source`, this property represents the resource used to render the loading indicator for the image. The loading indicator is displayed until image is ready to be displayed, typically after the image is downloaded.
+
+| Type |
+| ----------------------------------------------------- |
+| [ImageSource](image#imagesource) (`uri` only), number |
+
+---
+
+### `onError`
+
+Invoked on load error.
+
+| Type |
+| ----------------------------------- |
+| (`{nativeEvent: {error} }`) => void |
+
+---
+
+### `onLayout`
+
+Invoked on mount and on layout changes.
+
+| Type |
+| ------------------------------------------------------- |
+| `md ({nativeEvent: [LayoutEvent](layoutevent)} => void` |
+
+---
+
+### `onLoad`
+
+Invoked when load completes successfully.
+
+**Example:** `onLoad={({nativeEvent: {source: {width, height}}}) => setImageRealSize({width, height})}`
+
+| Type |
+| ------------------------------------------------------------------- |
+| `md ({nativeEvent: [ImageLoadEvent](image#imageloadevent)} => void` |
+
+---
+
+### `onLoadEnd`
+
+Invoked when load either succeeds or fails.
+
+| Type |
+| ---------- |
+| () => void |
+
+---
+
+### `onLoadStart`
+
+Invoked on load start.
+
+**Example:** `onLoadStart={() => this.setState({loading: true})}`
+
+| Type |
+| ---------- |
+| () => void |
+
+---
+
+### `onPartialLoad`
iOS
+
+Invoked when a partial load of the image is complete. The definition of what constitutes a "partial load" is loader specific though this is meant for progressive JPEG loads.
+
+| Type |
+| ---------- |
+| () => void |
+
+---
+
+### `onProgress`
+
+Invoked on download progress.
+
+| Type |
+| ------------------------------------------- |
+| (`{nativeEvent: {loaded, total} }`) => void |
+
+---
+
+### `progressiveRenderingEnabled`
Android
+
+When `true`, enables progressive jpeg streaming - https://frescolib.org/docs/progressive-jpegs.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `referrerPolicy`
+
+A string indicating which referrer to use when fetching the resource. Sets the value for `Referrer-Policy` header in the image request. Works similar to `referrerpolicy` attribute in HTML.
+
+| Type | Default |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
+| enum(`'no-referrer'`, `'no-referrer-when-downgrade'`, `'origin'`, `'origin-when-cross-origin'`, `'same-origin'`, `'strict-origin'`, `'strict-origin-when-cross-origin'`, `'unsafe-url'`) | `'strict-origin-when-cross-origin'` |
+
+---
+
+### `ref`
+
+A ref setter that will be assigned an [element node](element-nodes) when mounted.
+
+---
+
+### `resizeMethod`
Android
+
+The mechanism that should be used to resize the image when the image's dimensions differ from the image view's dimensions. Defaults to `auto`.
+
+- `auto`: Use heuristics to pick between `resize` and `scale`.
+
+- `resize`: A software operation which changes the encoded image in memory before it gets decoded. This should be used instead of `scale` when the image is much larger than the view.
+
+- `scale`: The image gets drawn downscaled or upscaled. Compared to `resize`, `scale` is faster (usually hardware accelerated) and produces higher quality images. This should be used if the image is smaller than the view. It should also be used if the image is slightly bigger than the view.
+
+- `none`: No sampling is performed and the image is displayed in its full resolution. This should only be used in rare circumstances because it is considered unsafe as Android will throw a runtime exception when trying to render images that consume too much memory.
+
+More details about `resize` and `scale` can be found at https://frescolib.org/docs/resizing.
+
+| Type | Default |
+| ----------------------------------------------- | -------- |
+| enum(`'auto'`, `'resize'`, `'scale'`, `'none'`) | `'auto'` |
+
+---
+
+### `resizeMode`
+
+Determines how to resize the image when the frame doesn't match the raw image dimensions. Defaults to `cover`.
+
+- `cover`: Scale the image uniformly (maintain the image's aspect ratio) so that
+ - both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding)
+ - at least one dimension of the scaled image will be equal to the corresponding dimension of the view (minus padding)
+
+- `contain`: Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
+
+- `stretch`: Scale width and height independently, This may change the aspect ratio of the src.
+
+- `repeat`: Repeat the image to cover the frame of the view. The image will keep its size and aspect ratio, unless it is larger than the view, in which case it will be scaled down uniformly so that it is contained in the view.
+
+- `center`: Center the image in the view along both dimensions. If the image is larger than the view, scale it down uniformly so that it is contained in the view.
+
+| Type | Default |
+| ----------------------------------------------------------------- | --------- |
+| enum(`'cover'`, `'contain'`, `'stretch'`, `'repeat'`, `'center'`) | `'cover'` |
+
+---
+
+### `resizeMultiplier`
Android
+
+When the `resizeMethod` is set to `resize`, the destination dimensions are multiplied by this value. The `scale` method is used to perform the remainder of the resize. A default of `1.0` means the bitmap size is designed to fit the destination dimensions. A multiplier greater than `1.0` will set the resize options larger than that of the destination dimensions, and the resulting bitmap will be scaled down from the hardware size. Defaults to `1.0`.
+
+This prop is most useful in cases where the destination dimensions are quite small and the source image is significantly larger. The `resize` resize method performs downsampling and significant image quality is lost between the source and destination image sizes, often resulting in a blurry image. By using a multiplier, the decoded image is slightly larger than the target size but smaller than the source image (if the source image is large enough). This allows aliasing artifacts to produce faux quality through scaling operations on the multiplied image.
+
+If you have a source image with dimensions 200x200 and destination dimensions of 24x24, a resizeMultiplier of `2.0` will tell Fresco to downsample the image to 48x48. Fresco picks the closest power of 2 (so, 50x50) and decodes the image into a bitmap of that size. Without the multiplier, the closest power of 2 would be 25x25. The resultant image is scaled down by the system.
+
+| Type | Default |
+| ------ | ------- |
+| number | `1.0` |
+
+---
+
+### `source`
+
+The image source (either a remote URL or a local file resource).
+
+This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best `uri` to display based on the measured size of the image container. A `cache` property can be added to control how networked request interacts with the local cache. (For more information see [Cache Control for Images](images#cache-control)).
+
+The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`, `webp`, `psd` (iOS only). In addition, iOS supports several RAW image formats. Refer to Apple's documentation for the current list of supported camera models (for iOS 12, see https://support.apple.com/en-ca/HT208967).
+
+Please note that the `webp` format is supported on iOS **only** when bundled with the JavaScript code.
+
+| Type |
+| -------------------------------- |
+| [ImageSource](image#imagesource) |
+
+---
+
+### `src`
+
+A string representing the remote URL of the image. This prop has precedence over `source` prop.
+
+**Example:** `src={'https://reactnative.dev/img/tiny_logo.png'}`
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `srcSet`
+
+A string representing comma separated list of possible candidate image source. Each image source contains a URL of an image and a pixel density descriptor. If no descriptor is specified, it defaults to descriptor of `1x`.
+
+If `srcSet` does not contain a `1x` descriptor, the value in `src` is used as image source with `1x` descriptor (if provided).
+
+This prop has precedence over both the `src` and `source` props.
+
+**Example:** `srcSet={'https://reactnative.dev/img/tiny_logo.png 1x, https://reactnative.dev/img/header_logo.svg 2x'}`
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `style`
+
+| Type |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Image Style Props](image-style-props#props), [Layout Props](layout-props#props), [Shadow Props](shadow-props#props), [Transforms](transforms#props) |
+
+---
+
+### `testID`
+
+A unique identifier for this element to be used in UI Automation testing scripts.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `tintColor`
+
+Changes the color of all non-transparent pixels to the `tintColor`.
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `width`
+
+Width of the image component.
+
+| Type |
+| ------ |
+| number |
+
+## Methods
+
+### `abortPrefetch()`
| number | Request id as returned by `prefetch()`. |
+
+---
+
+### `getSize()`
+
+```tsx
+static getSize(uri: string): Promise<{width: number, height: number}>;
+```
+
+Retrieve the width and height (in pixels) of an image prior to displaying it. This method can fail if the image cannot be found, or fails to download.
+
+In order to retrieve the image dimensions, the image may first need to be loaded or downloaded, after which it will be cached. This means that in principle you could use this method to preload images, however it is not optimized for that purpose, and may in future be implemented in a way that does not fully load/download the image data. A proper, supported way to preload images will be provided as a separate API.
+
+**Parameters:**
+
+|
Name
| Type | Description |
+| -------------------------------------------------------- | ------ | -------------------------- |
+| uri
Required
| string | The location of the image. |
+
+---
+
+### `getSizeWithHeaders()`
+
+```tsx
+static getSizeWithHeaders(
+ uri: string,
+ headers: {[index: string]: string}
+): Promise<{width: number, height: number}>;
+```
+
+Retrieve the width and height (in pixels) of an image prior to displaying it with the ability to provide the headers for the request. This method can fail if the image cannot be found, or fails to download. It also does not work for static image resources.
+
+In order to retrieve the image dimensions, the image may first need to be loaded or downloaded, after which it will be cached. This means that in principle you could use this method to preload images, however it is not optimized for that purpose, and may in future be implemented in a way that does not fully load/download the image data. A proper, supported way to preload images will be provided as a separate API.
+
+**Parameters:**
+
+|
Name
| Type | Description |
+| ------------------------------------------------------------ | ------ | ---------------------------- |
+| uri
Required
| string | The location of the image. |
+| headers
Required
| object | The headers for the request. |
+
+---
+
+### `prefetch()`
+
+```tsx
+await Image.prefetch(url);
+```
+
+Prefetches a remote image for later use by downloading it to the disk cache. Returns a promise which resolves to a boolean.
+
+**Parameters:**
+
+| Name | Type | Description |
+| -------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------ |
+| url
Required
| string | The remote location of the image. |
+| callback | function
Android
| The function that will be called with the `requestId`. |
+
+---
+
+### `queryCache()`
+
+```tsx
+static queryCache(
+ urls: string[],
+): Promise>;
+```
+
+Perform cache interrogation. Returns a promise which resolves to a mapping from URL to cache status, such as "disk", "memory" or "disk/memory". If a requested URL is not in the mapping, it means it's not in the cache.
+
+**Parameters:**
+
+| Name | Type | Description |
+| --------------------------------------------------------- | ----- | ------------------------------------------ |
+| urls
Required
| array | List of image URLs to check the cache for. |
+
+---
+
+### `resolveAssetSource()`
+
+```tsx
+static resolveAssetSource(source: ImageSourcePropType): {
+ height: number;
+ width: number;
+ scale: number;
+ uri: string;
+};
+```
+
+Resolves an asset reference into an object which has the properties `uri`, `scale`, `width`, and `height`.
+
+**Parameters:**
+
+|
| [ImageSource](image#imagesource), number | A number (opaque type returned by `require('./foo.png')`) or an ImageSource. |
+
+## Type Definitions
+
+### ImageCacheEnum
iOS
+
+Enum which can be used to set the cache handling or strategy for the potentially cached responses.
+
+| Type | Default |
+| ------------------------------------------------------------------ | ----------- |
+| enum(`'default'`, `'reload'`, `'force-cache'`, `'only-if-cached'`) | `'default'` |
+
+- `default`: Use the native platforms default strategy.
+- `reload`: The data for the URL will be loaded from the originating source. No existing cache data should be used to satisfy a URL load request.
+- `force-cache`: The existing cached data will be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source.
+- `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source, and the load is considered to have failed.
+
+### ImageLoadEvent
+
+Object returned in the `onLoad` callback.
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type | Description |
+| ------ | ------ | ----------------------------------- |
+| source | object | The [source object](#source-object) |
+
+#### Source Object
+
+**Properties:**
+
+| Name | Type | Description |
+| ------ | ------ | ------------------------------------------------------------ |
+| width | number | The width of loaded image. |
+| height | number | The height of loaded image. |
+| uri | string | A string representing the resource identifier for the image. |
+
+### ImageSource
+
+| Type |
+| -------------------------------- |
+| object, array of objects, number |
+
+**Properties (if passing as object or array of objects):**
+
+|
Name
| Type | Description |
+| ------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| uri | string | A string representing the resource identifier for the image, which could be an http address, a local file path, or the name of a static image resource. |
+| width | number | Can be specified if known at build time, in which case the value will be used to set the default `` component dimension. |
+| height | number | Can be specified if known at build time, in which case the value will be used to set the default `` component dimension. |
+| scale | number | Used to indicate the scale factor of the image. Defaults to `1.0` if unspecified, meaning that one image pixel equates to one display point / DIP. |
+| bundle
iOS
| string | The iOS asset bundle which the image is included in. This will default to `[NSBundle mainBundle]` if not set. |
+| method | string | The HTTP Method to use. Defaults to `'GET'` if not specified. |
+| headers | object | An object representing the HTTP headers to send along with the request for a remote image. |
+| body | string | The HTTP body to send with the request. This must be a valid UTF-8 string, and will be sent exactly as specified, with no additional encoding (e.g. URL-escaping or base64) applied. |
+| cache
iOS
| [ImageCacheEnum](image#imagecacheenum-ios) | Determines how the requests handles potentially cached responses. |
+
+**If passing a number:**
+
+- `number` - opaque type returned by something like `require('./image.jpg')`.
diff --git a/website/versioned_docs/version-0.86/imagebackground.md b/website/versioned_docs/version-0.86/imagebackground.md
new file mode 100644
index 00000000000..6670fd3b632
--- /dev/null
+++ b/website/versioned_docs/version-0.86/imagebackground.md
@@ -0,0 +1,82 @@
+---
+id: imagebackground
+title: ImageBackground
+---
+
+A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `` component, which has the same props as ``, and add whatever children to it you would like to layer on top of it.
+
+You might not want to use `` in some cases, since the implementation is basic. Refer to ``'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.
+
+Note that you must specify some width and height style attributes.
+
+## Example
+
+```SnackPlayer name=ImageBackground
+import React from 'react';
+import {ImageBackground, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const image = {uri: 'https://legacy.reactjs.org/logo-og.png'};
+
+const App = () => (
+
+
+
+ Inside
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ image: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ text: {
+ color: 'white',
+ fontSize: 42,
+ lineHeight: 84,
+ fontWeight: 'bold',
+ textAlign: 'center',
+ backgroundColor: '#000000c0',
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Props
+
+### [Image Props](image.md#props)
+
+Inherits [Image Props](image.md#props).
+
+---
+
+### `imageStyle`
+
+| Type |
+| ----------------------------------- |
+| [Image Style](image-style-props.md) |
+
+---
+
+### `imageRef`
+
+A ref setter that will be assigned the [element node](element-nodes) of the inner `Image` component when mounted.
+
+---
+
+### `style`
+
+| Type |
+| --------------------------------- |
+| [View Style](view-style-props.md) |
diff --git a/website/versioned_docs/version-0.86/imagepickerios.md b/website/versioned_docs/version-0.86/imagepickerios.md
new file mode 100644
index 00000000000..ca5814e8677
--- /dev/null
+++ b/website/versioned_docs/version-0.86/imagepickerios.md
@@ -0,0 +1,8 @@
+---
+id: imagepickerios
+title: '❌ ImagePickerIOS'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=image+picker) instead.
+:::
diff --git a/website/versioned_docs/version-0.86/images.md b/website/versioned_docs/version-0.86/images.md
new file mode 100644
index 00000000000..3a57eda7d66
--- /dev/null
+++ b/website/versioned_docs/version-0.86/images.md
@@ -0,0 +1,280 @@
+---
+id: images
+title: Images
+---
+
+## Static Image Resources
+
+React Native provides a unified way of managing images and other media assets in your Android and iOS apps. To add a static image to your app, place it somewhere in your source code tree and reference it like this:
+
+```tsx
+
+```
+
+The image name is resolved the same way JS modules are resolved. In the example above, the bundler will look for `my-icon.png` in the same folder as the component that requires it.
+
+You can use the `@2x` and `@3x` suffixes to provide images for different screen densities. If you have the following file structure:
+
+```
+.
+├── button.js
+└── img
+ ├── check.png
+ ├── check@2x.png
+ └── check@3x.png
+```
+
+...and `button.js` code contains:
+
+```tsx
+
+```
+
+...the bundler will bundle and serve the image corresponding to device's screen density. For example, `check@2x.png`, will be used on an iPhone 7, while`check@3x.png` will be used on an iPhone 7 Plus or a Nexus 5. If there is no image matching the screen density, the closest best option will be selected.
+
+On Windows, you might need to restart the bundler if you add new images to your project.
+
+Here are some benefits that you get:
+
+1. Same system on Android and iOS.
+2. Images live in the same folder as your JavaScript code. Components are self-contained.
+3. No global namespace, i.e. you don't have to worry about name collisions.
+4. Only the images that are actually used will be packaged into your app.
+5. Adding and changing images doesn't require app recompilation, you can refresh the simulator as you normally do.
+6. The bundler knows the image dimensions, no need to duplicate it in the code.
+7. Images can be distributed via [npm](https://www.npmjs.com/) packages.
+
+In order for this to work, the image name in `require` has to be known statically.
+
+```tsx
+// GOOD
+;
+
+// BAD
+const icon = this.props.active
+ ? 'my-icon-active'
+ : 'my-icon-inactive';
+;
+
+// GOOD
+const icon = this.props.active
+ ? require('./my-icon-active.png')
+ : require('./my-icon-inactive.png');
+;
+```
+
+Note that image sources required this way include size (width, height) info for the Image. If you need to scale the image dynamically (i.e. via flex), you may need to manually set `{width: undefined, height: undefined}` on the style attribute.
+
+## Static Non-Image Resources
+
+The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html`, `.pdf` and more. See [bundler defaults](https://github.com/facebook/metro/blob/main/packages/metro-config/src/defaults/defaults.js#L16-L51) for the full list.
+
+You can add support for other types by adding an [`assetExts` resolver option](https://metrobundler.dev/docs/configuration#resolver-options) in your [Metro configuration](https://metrobundler.dev/docs/configuration).
+
+A caveat is that videos must use absolute positioning instead of `flexGrow`, since size info is not currently passed for non-image assets. This limitation doesn't occur for videos that are linked directly into Xcode or the Assets folder for Android.
+
+## Images From Hybrid App's Resources
+
+If you are building a hybrid app (some UIs in React Native, some UIs in platform code) you can still use images that are already bundled into the app.
+
+For images included via Xcode asset catalogs or in the Android drawable folder, use the image name without the extension:
+
+```tsx
+
+```
+
+For images in the Android assets folder, use the `asset:/` scheme:
+
+```tsx
+
+```
+
+These approaches provide no safety checks. It's up to you to guarantee that those images are available in the application. Also you have to specify image dimensions manually.
+
+## Network Images
+
+Many of the images you will display in your app will not be available at compile time, or you will want to load some dynamically to keep the binary size down. Unlike with static resources, _you will need to manually specify the dimensions of your image_. It's highly recommended that you use https as well in order to satisfy [App Transport Security](publishing-to-app-store.md#1-enable-app-transport-security) requirements on iOS.
+
+```tsx
+// GOOD
+
+
+// BAD
+
+```
+
+### Network Requests for Images
+
+If you would like to set such things as the HTTP-Verb, Headers or a Body along with the image request, you may do this by defining these properties on the source object:
+
+```tsx
+
+```
+
+## URI Data Images
+
+Sometimes, you might be getting encoded image data from a REST API call. You can use the `'data:'` URI scheme to use these images. Same as for network resources, _you will need to manually specify the dimensions of your image_.
+
+:::info
+This is recommended for very small and dynamic images only, like icons in a list from a DB.
+:::
+
+```tsx
+// include at least width and height!
+
+```
+
+### Cache Control
+
+In some cases you might only want to display an image if it is already in the local cache, i.e. a low resolution placeholder until a higher resolution is available. In other cases you do not care if the image is outdated and are willing to display an outdated image to save bandwidth. The `cache` source property gives you control over how the network layer interacts with the cache.
+
+- `default`: Use the native platforms default strategy.
+- `reload`: The data for the URL will be loaded from the originating source. No existing cache data should be used to satisfy a URL load request.
+- `force-cache`: The existing cached data will be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source.
+- `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source, and the load is considered to have failed.
+
+```tsx
+
+```
+
+## Local Filesystem Images
+
+See [CameraRoll](https://github.com/react-native-community/react-native-cameraroll) for an example of using local resources that are outside of `Images.xcassets`.
+
+### Drawable resources
+
+Android supports loading [drawable resources](https://developer.android.com/guide/topics/resources/drawable-resource) via the `xml` file type. This means you can use [vector drawables](https://developer.android.com/develop/ui/views/graphics/vector-drawable-resources) for rendering icons or [shape drawables](https://developer.android.com/guide/topics/resources/drawable-resource#Shape) for, well, drawing shapes! You can import and use these resource types the same as any other [static resource](#static-image-resources) or [hybrid resource](#images-from-hybrid-apps-resources). You have to specify image dimensions manually.
+
+For static drawables that live alongside your JS code, use the `require` or `import` syntax (both work the same):
+
+```tsx
+
+```
+
+For drawables included in the Android drawable folder (i.e. `res/drawable`), use the resource name without the extension:
+
+```tsx
+
+```
+
+The one key difference between drawable resources and other image types is that the asset must be referenced at compile-time of the Android application as Android needs to run the [Android Asset Packaging Tool (AAPT)](https://developer.android.com/tools/aapt2) to package the asset. Binary XML, the file format AAPT creates, cannot be loaded over the network by Metro. If you change the directory or name of an asset, you will need to rebuild the Android application each time.
+
+#### Creating XML drawable resources
+
+Android provides comprehensive documentation on each of the supported drawable resource types in its [Drawable resources](https://developer.android.com/guide/topics/resources/drawable-resource) guide, along with examples of raw XML files. You can utilize tools from Android Studio like the [Vector Asset Studio](https://developer.android.com/studio/write/vector-asset-studio) to create vector drawables from Scalable Vector Graphic (SVG) and Adobe Photoshop Document (PSD) files.
+
+:::info
+You should try to avoid referencing other resources in the XML file you create if you want to treat your XML file as a static image resource (i.e. with an `import` or `require` statement). If you wish to utilize references to other drawables or attributes, like [color state lists](https://developer.android.com/guide/topics/resources/color-list-resource) or [dimension resources](https://developer.android.com/guide/topics/resources/more-resources#Dimension), you should include your drawable as a [hybrid resource](#images-from-hybrid-apps-resources) and import it by name.
+:::
+
+### Best Camera Roll Image
+
+iOS saves multiple sizes for the same image in your Camera Roll, it is very important to pick the one that's as close as possible for performance reasons. You wouldn't want to use the full quality 3264x2448 image as source when displaying a 200x200 thumbnail. If there's an exact match, React Native will pick it, otherwise it's going to use the first one that's at least 50% bigger in order to avoid blur when resizing from a close size. All of this is done by default so you don't have to worry about writing the tedious (and error prone) code to do it yourself.
+
+## Why Not Automatically Size Everything?
+
+_In the browser_ if you don't give a size to an image, the browser is going to render a 0x0 element, download the image, and then render the image based with the correct size. The big issue with this behavior is that your UI is going to jump all around as images load, this makes for a very bad user experience. This is called [Cumulative Layout Shift](https://web.dev/cls/).
+
+_In React Native_ this behavior is intentionally not implemented. It is more work for the developer to know the dimensions (or aspect ratio) of the remote image in advance, but we believe that it leads to a better user experience. Static images loaded from the app bundle via the `require('./my-icon.png')` syntax _can be automatically sized_ because their dimensions are available immediately at the time of mounting.
+
+For example, the result of `require('./my-icon.png')` might be:
+
+```tsx
+{"__packager_asset":true,"uri":"my-icon.png","width":591,"height":573}
+```
+
+## Source as an object
+
+In React Native, one interesting decision is that the `src` attribute is named `source` and doesn't take a string but an object with a `uri` attribute.
+
+```tsx
+
+```
+
+On the infrastructure side, the reason is that it allows us to attach metadata to this object. For example if you are using `require('./my-icon.png')`, then we add information about its actual location and size (don't rely on this fact, it might change in the future!). This is also future proofing, for example we may want to support sprites at some point, instead of outputting `{uri: ...}`, we can output `{uri: ..., crop: {left: 10, top: 50, width: 20, height: 40}}` and transparently support spriting on all the existing call sites.
+
+On the user side, this lets you annotate the object with useful attributes such as the dimension of the image in order to compute the size it's going to be displayed in. Feel free to use it as your data structure to store more information about your image.
+
+## Background Image via Nesting
+
+A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `` component, which has the same props as ``, and add whatever children to it you would like to layer on top of it.
+
+You might not want to use `` in some cases, since the implementation is basic. Refer to ``'s [documentation](imagebackground.md) for more insight, and create your own custom component when needed.
+
+```tsx
+return (
+
+ Inside
+
+);
+```
+
+Note that you must specify some width and height style attributes.
+
+## iOS Border Radius Styles
+
+Please note that the following corner specific, border radius style properties might be ignored by iOS's image component:
+
+- `borderTopLeftRadius`
+- `borderTopRightRadius`
+- `borderBottomLeftRadius`
+- `borderBottomRightRadius`
+
+## Off-thread Decoding
+
+Image decoding can take more than a frame-worth of time. This is one of the major sources of frame drops on the web because decoding is done in the main thread. In React Native, image decoding is done in a different thread. In practice, you already need to handle the case when the image is not downloaded yet, so displaying the placeholder for a few more frames while it is decoding does not require any code change.
+
+## Configuring iOS Image Cache Limits
+
+On iOS, we expose an API to override React Native's default image cache limits. This should be called from within your native AppDelegate code (e.g. within `didFinishLaunchingWithOptions`).
+
+```objectivec
+RCTSetImageCacheLimits(4*1024*1024, 200*1024*1024);
+```
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------------- | ------ | -------- | ----------------------- |
+| imageSizeLimit | number | Yes | Image cache size limit. |
+| totalCostLimit | number | Yes | Total cache cost limit. |
+
+In the above code example the image size limit is set to 4 MB and the total cost limit is set to 200 MB.
diff --git a/website/versioned_docs/version-0.86/improvingux.md b/website/versioned_docs/version-0.86/improvingux.md
new file mode 100644
index 00000000000..462f5f0ce1c
--- /dev/null
+++ b/website/versioned_docs/version-0.86/improvingux.md
@@ -0,0 +1,596 @@
+---
+id: improvingux
+title: Improving User Experience
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+## Configure text inputs
+
+Entering text on touch phone is a challenge - small screen, software keyboard. But based on what kind of data you need, you can make it easier by properly configuring the text inputs:
+
+- Focus the first field automatically
+- Use placeholder text as an example of expected data format
+- Enable or disable autocapitalization and autocorrect
+- Choose keyboard type (e.g. email, numeric)
+- Make sure the return button focuses the next field or submits the form
+
+Check out [`TextInput` docs](textinput.md) for more configuration options.
+
+
+
+
+```SnackPlayer name=TextInput%20form%20example&ext=js
+import React, {useState, useRef} from 'react';
+import {
+ Alert,
+ Text,
+ StatusBar,
+ TextInput,
+ View,
+ StyleSheet,
+} from 'react-native';
+
+const App = () => {
+ const emailInput = useRef(null);
+ const [name, setName] = useState('');
+ const [email, setEmail] = useState('');
+
+ const submit = () => {
+ Alert.alert(
+ `Welcome, ${name}! Confirmation email has been sent to ${email}`,
+ );
+ };
+
+ return (
+
+
+
+
+ This demo shows how using available TextInput customizations can make
+ forms much easier to use. Try completing the form and notice that
+ different fields have specific optimizations and the return key
+ changes from focusing next input to submitting the form.
+
+
+ setName(text)}
+ placeholder="Full Name"
+ autoFocus={true}
+ autoCapitalize="words"
+ autoCorrect={true}
+ keyboardType="default"
+ returnKeyType="next"
+ onSubmitEditing={() => emailInput.current.focus()}
+ blurOnSubmit={false}
+ />
+ setEmail(text)}
+ ref={emailInput}
+ placeholder="email@example.com"
+ autoCapitalize="none"
+ autoCorrect={false}
+ keyboardType="email-address"
+ returnKeyType="send"
+ onSubmitEditing={submit}
+ blurOnSubmit={true}
+ />
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ header: {
+ paddingTop: 64,
+ padding: 20,
+ backgroundColor: '#282c34',
+ },
+ description: {
+ fontSize: 14,
+ color: 'white',
+ },
+ input: {
+ margin: 20,
+ marginBottom: 0,
+ height: 34,
+ paddingHorizontal: 10,
+ borderRadius: 4,
+ borderColor: '#ccc',
+ borderWidth: 1,
+ fontSize: 16,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=TextInput%20form%20example&ext=tsx
+import React, {useState, useRef} from 'react';
+import {
+ Alert,
+ Text,
+ StatusBar,
+ TextInput,
+ View,
+ StyleSheet,
+} from 'react-native';
+
+const App = () => {
+ const emailInput = useRef(null);
+ const [name, setName] = useState('');
+ const [email, setEmail] = useState('');
+
+ const submit = () => {
+ Alert.alert(
+ `Welcome, ${name}! Confirmation email has been sent to ${email}`,
+ );
+ };
+
+ return (
+
+
+
+
+ This demo shows how using available TextInput customizations can make
+ forms much easier to use. Try completing the form and notice that
+ different fields have specific optimizations and the return key
+ changes from focusing next input to submitting the form.
+
+
+ setName(text)}
+ placeholder="Full Name"
+ autoFocus={true}
+ autoCapitalize="words"
+ autoCorrect={true}
+ keyboardType="default"
+ returnKeyType="next"
+ onSubmitEditing={() => emailInput.current?.focus()}
+ blurOnSubmit={false}
+ />
+ setEmail(text)}
+ ref={emailInput}
+ placeholder="email@example.com"
+ autoCapitalize="none"
+ autoCorrect={false}
+ keyboardType="email-address"
+ returnKeyType="send"
+ onSubmitEditing={submit}
+ blurOnSubmit={true}
+ />
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ header: {
+ paddingTop: 64,
+ padding: 20,
+ backgroundColor: '#282c34',
+ },
+ description: {
+ fontSize: 14,
+ color: 'white',
+ },
+ input: {
+ margin: 20,
+ marginBottom: 0,
+ height: 34,
+ paddingHorizontal: 10,
+ borderRadius: 4,
+ borderColor: '#ccc',
+ borderWidth: 1,
+ fontSize: 16,
+ },
+});
+
+export default App;
+```
+
+
+
+
+## Manage layout when keyboard is visible
+
+Software keyboard takes almost half of the screen. If you have interactive elements that can get covered by the keyboard, make sure they are still accessible by using the [`KeyboardAvoidingView` component](keyboardavoidingview.md).
+
+
+
+
+```SnackPlayer name=KeyboardAvoidingView%20example&ext=js
+import React, {useState, useRef} from 'react';
+import {
+ Alert,
+ Text,
+ Button,
+ StatusBar,
+ TextInput,
+ KeyboardAvoidingView,
+ View,
+ StyleSheet,
+} from 'react-native';
+
+const App = () => {
+ const emailInput = useRef(null);
+ const [email, setEmail] = useState('');
+
+ const submit = () => {
+ emailInput.current.blur();
+ Alert.alert(`Confirmation email has been sent to ${email}`);
+ };
+
+ return (
+
+
+
+
+ This demo shows how to avoid covering important UI elements with the
+ software keyboard. Focus the email input below and notice that the
+ Sign Up button and the text adjusted positions to make sure they are
+ not hidden under the keyboard.
+
+
+
+ setEmail(text)}
+ ref={emailInput}
+ placeholder="email@example.com"
+ autoCapitalize="none"
+ autoCorrect={false}
+ keyboardType="email-address"
+ returnKeyType="send"
+ onSubmitEditing={submit}
+ blurOnSubmit={true}
+ />
+
+
+ Some important legal fine print here
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ header: {
+ paddingTop: 64,
+ padding: 20,
+ backgroundColor: '#282c34',
+ },
+ description: {
+ fontSize: 14,
+ color: 'white',
+ },
+ input: {
+ margin: 20,
+ marginBottom: 0,
+ height: 34,
+ paddingHorizontal: 10,
+ borderRadius: 4,
+ borderColor: '#ccc',
+ borderWidth: 1,
+ fontSize: 16,
+ },
+ legal: {
+ margin: 10,
+ color: '#333',
+ fontSize: 12,
+ textAlign: 'center',
+ },
+ form: {
+ flex: 1,
+ justifyContent: 'space-between',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=KeyboardAvoidingView%20example&ext=tsx
+import React, {useState, useRef} from 'react';
+import {
+ Alert,
+ Text,
+ Button,
+ StatusBar,
+ TextInput,
+ KeyboardAvoidingView,
+ View,
+ StyleSheet,
+} from 'react-native';
+
+const App = () => {
+ const emailInput = useRef(null);
+ const [email, setEmail] = useState('');
+
+ const submit = () => {
+ emailInput.current?.blur();
+ Alert.alert(`Confirmation email has been sent to ${email}`);
+ };
+
+ return (
+
+
+
+
+ This demo shows how to avoid covering important UI elements with the
+ software keyboard. Focus the email input below and notice that the
+ Sign Up button and the text adjusted positions to make sure they are
+ not hidden under the keyboard.
+
+
+
+ setEmail(text)}
+ ref={emailInput}
+ placeholder="email@example.com"
+ autoCapitalize="none"
+ autoCorrect={false}
+ keyboardType="email-address"
+ returnKeyType="send"
+ onSubmitEditing={submit}
+ blurOnSubmit={true}
+ />
+
+
+ Some important legal fine print here
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ header: {
+ paddingTop: 64,
+ padding: 20,
+ backgroundColor: '#282c34',
+ },
+ description: {
+ fontSize: 14,
+ color: 'white',
+ },
+ input: {
+ margin: 20,
+ marginBottom: 0,
+ height: 34,
+ paddingHorizontal: 10,
+ borderRadius: 4,
+ borderColor: '#ccc',
+ borderWidth: 1,
+ fontSize: 16,
+ },
+ legal: {
+ margin: 10,
+ color: '#333',
+ fontSize: 12,
+ textAlign: 'center',
+ },
+ form: {
+ flex: 1,
+ justifyContent: 'space-between',
+ },
+});
+
+export default App;
+```
+
+
+
+
+## Make tappable areas larger
+
+On mobile phones it's hard to be very precise when pressing buttons. Make sure all interactive elements are 44x44 or larger. One way to do this is to leave enough space for the element, `padding`, `minWidth` and `minHeight` style values can be useful for that. Alternatively, you can use [`hitSlop` prop](touchablewithoutfeedback.md#hitslop) to increase interactive area without affecting the layout. Here's a demo:
+
+```SnackPlayer name=HitSlop%20example
+import React from 'react';
+import {
+ Text,
+ StatusBar,
+ TouchableOpacity,
+ View,
+ StyleSheet,
+} from 'react-native';
+
+const App = () => {
+ return (
+
+
+
+
+ This demo shows how using hitSlop can make interactive elements much
+ easier to tap without changing their layout and size. Try pressing
+ each button quickly multiple times and notice which one is easier to
+ hit.
+
+
+
+
+ Without hitSlop
+
+
+
+
+ With hitSlop
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ header: {
+ paddingTop: 64,
+ padding: 20,
+ backgroundColor: '#282c34',
+ },
+ description: {
+ fontSize: 14,
+ color: 'white',
+ },
+ content: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ label: {
+ fontSize: 18,
+ color: '#336699',
+ textAlign: 'center',
+ borderColor: '#ddd',
+ borderWidth: 1,
+ },
+ separator: {
+ height: 50,
+ },
+ preview: {
+ padding: 20,
+ backgroundColor: '#f6f6f6',
+ },
+});
+
+export default App;
+```
+
+## Use Android Ripple
+
+Android API 21+ uses the material design ripple to provide user with feedback when they touch an interactable area on the screen. React Native exposes this through the [`TouchableNativeFeedback` component](touchablenativefeedback.md). Using this touchable effect instead of opacity or highlight will often make your app feel much more fitting on the platform. That said, you need to be careful when using it because it doesn't work on iOS or on Android API < 21, so you will need to fallback to using one of the other Touchable components on iOS. You can use a library like [react-native-platform-touchable](https://github.com/react-community/react-native-platform-touchable) to handle the platform differences for you.
+
+```SnackPlayer name=Android%20Ripple%20example&supportedPlatforms=android
+import React from 'react';
+import {
+ TouchableNativeFeedback,
+ TouchableOpacity,
+ TouchableHighlight,
+ Platform,
+ Text,
+ View,
+ StyleSheet,
+} from 'react-native';
+
+const SUPPORTS_NATIVE_FEEDBACK =
+ Platform.OS === 'android' && Platform.Version >= 21;
+
+const noop = () => {};
+const defaultHitSlop = {top: 15, bottom: 15, right: 15, left: 15};
+
+const ButtonsWithNativeFeedback = () => (
+
+
+
+ This is a ripple respecting borders
+
+
+
+
+
+ This is ripple without borders, this is more useful for icons, eg: in
+ tab bar
+
+
+
+
+);
+
+const Buttons = () => (
+
+
+ This is opacity
+
+
+ This is highlight
+
+
+);
+
+const App = () => (
+
+ {SUPPORTS_NATIVE_FEEDBACK ? : }
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ paddingTop: 64,
+ backgroundColor: '#fff',
+ },
+ buttonContainer: {
+ margin: 24,
+ },
+ text: {
+ fontSize: 20,
+ color: '#fff',
+ fontWeight: 'bold',
+ },
+ button: {
+ padding: 25,
+ borderRadius: 5,
+ backgroundColor: '#000',
+ marginBottom: 30,
+ },
+});
+
+export default App;
+```
+
+## Screen orientation lock
+
+Multiple screen orientations should work fine by default unless you're using `Dimensions` API and don't handle orientation changes. If you don't want to support multiple screen orientations, you can lock the screen orientation to either portrait or landscape.
+
+On iOS, in the General tab and Deployment Info section of Xcode enable the Device Orientation you want to support (ensure you have selected iPhone from the Devices menu when making the changes). For Android, open the AndroidManifest.xml file and within the activity element add `'android:screenOrientation="portrait"'` to lock to portrait or `'android:screenOrientation="landscape"'` to lock to landscape.
+
+# Learn more
+
+[Material Design](https://material.io/) and [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines) are great resources for learning more about designing for mobile platforms.
diff --git a/website/versioned_docs/version-0.86/inputaccessoryview.md b/website/versioned_docs/version-0.86/inputaccessoryview.md
new file mode 100644
index 00000000000..a4f56532fa4
--- /dev/null
+++ b/website/versioned_docs/version-0.86/inputaccessoryview.md
@@ -0,0 +1,98 @@
+---
+id: inputaccessoryview
+title: InputAccessoryView
+---
+
+A component which enables customization of the keyboard input accessory view on iOS. The input accessory view is displayed above the keyboard whenever a `TextInput` has focus. This component can be used to create custom toolbars.
+
+To use this component wrap your custom toolbar with the InputAccessoryView component, and set a `nativeID`. Then, pass that `nativeID` as the `inputAccessoryViewID` of whatever `TextInput` you desire. A basic example:
+
+```SnackPlayer name=InputAccessoryView&supportedPlatforms=ios
+import React, {useState} from 'react';
+import {
+ Button,
+ InputAccessoryView,
+ ScrollView,
+ TextInput,
+ StyleSheet,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const inputAccessoryViewID = 'uniqueID';
+const initialText = '';
+
+const App = () => {
+ const [text, setText] = useState(initialText);
+
+ return (
+
+
+
+
+
+
+
+ setText(initialText)} title="Clear text" />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ paddingHorizontal: 20,
+ },
+ textInput: {
+ padding: 16,
+ borderColor: 'black',
+ borderWidth: 1,
+ },
+});
+
+export default App;
+```
+
+This component can also be used to create sticky text inputs (text inputs which are anchored to the top of the keyboard). To do this, wrap a `TextInput` with the `InputAccessoryView` component, and don't set a `nativeID`. For an example, look at [InputAccessoryViewExample.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/InputAccessoryView/InputAccessoryViewExample.js).
+
+---
+
+# Reference
+
+## Props
+
+### `backgroundColor`
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `nativeID`
+
+An ID which is used to associate this `InputAccessoryView` to specified TextInput(s).
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `style`
+
+| Type |
+| --------------------------------- |
+| [View Style](view-style-props.md) |
+
+# Known issues
+
+- [react-native#18997](https://github.com/facebook/react-native/issues/18997): Doesn't support multiline `TextInput`
+- [react-native#20157](https://github.com/facebook/react-native/issues/20157): Can't use with a bottom tab bar
diff --git a/website/versioned_docs/version-0.86/integration-with-android-fragment.md b/website/versioned_docs/version-0.86/integration-with-android-fragment.md
new file mode 100644
index 00000000000..e9c385b3eb1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/integration-with-android-fragment.md
@@ -0,0 +1,201 @@
+---
+id: integration-with-android-fragment
+title: Integration with an Android Fragment
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+The guide for [Integration with Existing Apps](/docs/integration-with-existing-apps) details how to integrate a full-screen React Native app into an existing Android app as an **Activity**.
+
+To use React Native components within **Fragments** in an existing app requires some additional setup.
+
+### 1. Add React Native to your app
+
+Follow the guide for [Integration with Existing Apps](/docs/integration-with-existing-apps) until the end to make sure you can safely run your React Native app in a full screen Activity.
+
+### 2. Add a FrameLayout for the React Native Fragment
+
+In this example, we're going to use a `FrameLayout` to add a React Native Fragment to an Activity. This approach is flexible enough and can be adapted to use React Native in other layouts such as Bottom Sheets or Tab Layouts.
+
+First add a `` with an id, width and height to your Activity's layout (e.g. `main_activity.xml` in the `res/layouts` folder). This is the layout you will find to render your React Native Fragment.
+
+```xml
+
+```
+
+### 3. Make your host Activity implement `DefaultHardwareBackBtnHandler`
+
+As your host activity is not a `ReactActivity`, you need to implement the `DefaultHardwareBackBtnHandler` interface to handle the back button press event.
+This is required by React Native to handle the back button press event.
+
+Go into your host activity and make sure it implements the `DefaultHardwareBackBtnHandler` interface:
+
+:::warning Deprecated
+`Activity.onBackPressed()` has been [deprecated]() since API level 33. Android 16 devices with apps targeting API level 36 this will [no longer be called](https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back) and [OnBackPressedDispatcher](https://developer.android.com/reference/androidx/activity/OnBackPressedDispatcher) should be used instead.
+:::
+
+
+
+
+```diff
+package
+
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
++import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler
+
++class MainActivity : AppCompatActivity() {
++class MainActivity : AppCompatActivity(), DefaultHardwareBackBtnHandler {
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.main_activity)
+
+ findViewById(R.id.sample_button).setOnClickListener {
+ // Handle button click
+ }
+ }
+
++ override fun invokeDefaultOnBackPressed() {
++ onBackPressedDispatcher.onBackPressed()
++ }
+}
+```
+
+
+
+
+```diff
+package ;
+
+import android.os.Bundle;
+import androidx.appcompat.app.AppCompatActivity;
++import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
+
+-class MainActivity extends AppCompatActivity {
++class MainActivity extends AppCompatActivity implements DefaultHardwareBackBtnHandler {
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_activity);
+
+ findViewById(R.id.button_appcompose).setOnClickListener(button -> {
+ // Handle button click
+ });
+ }
+
++ @Override
++ public void invokeDefaultOnBackPressed() {
++ getOnBackPressedDispatcher().onBackPressed();
++ }
+}
+```
+
+
+
+
+### 4. Add a React Native Fragment to the FrameLayout
+
+Finally, we can update the Activity to add a React Native Fragment to the FrameLayout.
+In this specific example, we're going to assume that your Activity has a button with id `sample_button` that when clicked will render a React Native Fragment into the FrameLayout.
+
+Update your Activity's `onCreate` method as follows:
+
+
+
+
+```diff
+package
+
+import android.os.Bundle
+import androidx.appcompat.app.AppCompatActivity
++import com.facebook.react.ReactFragment
+import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler
+
+public class MainActivity : AppCompatActivity(), DefaultHardwareBackBtnHandler {
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.main_activity)
+
+ findViewById(R.id.sample_button).setOnClickListener {
++ val reactNativeFragment = ReactFragment.Builder()
++ .setComponentName("HelloWorld")
++ .setLaunchOptions(Bundle().apply { putString("message", "my value") })
++ .build()
++ supportFragmentManager
++ .beginTransaction()
++ .add(R.id.react_native_fragment, reactNativeFragment)
++ .commit()
+ }
+ }
+
+ override fun invokeDefaultOnBackPressed() {
+ super.onBackPressed()
+ }
+}
+```
+
+
+
+
+```diff
+package ;
+
+import android.os.Bundle;
+import androidx.appcompat.app.AppCompatActivity;
++import com.facebook.react.ReactFragment;
+import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
+
+public class MainActivity extends AppCompatActivity implements DefaultHardwareBackBtnHandler {
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main_activity);
+
+ findViewById(R.id.button_appcompose).setOnClickListener(button -> {
++ Bundle launchOptions = new Bundle();
++ launchOptions.putString("message", "my value");
++
++ ReactFragment fragment = new ReactFragment.Builder()
++ .setComponentName("HelloWorld")
++ .setLaunchOptions(launchOptions)
++ .build();
++ getSupportFragmentManager()
++ .beginTransaction()
++ .add(R.id.react_native_fragment, fragment)
++ .commit();
+ });
+ }
+
+ @Override
+ public void invokeDefaultOnBackPressed() {
+ super.onBackPressed();
+ }
+}
+```
+
+
+
+
+Let's look at the code above.
+
+The `ReactFragment.Builder()` is used to create a new `ReactFragment` and then we use the `supportFragmentManager` to add that Fragment to the `FrameLayout`.
+
+Inside the builder you can customize how the fragment is created:
+
+- `setComponentName` is the name of the component you want to render. It's the same string specified in your `index.js` inside the `registerComponent` method.
+- `setLaunchOptions` is an optional method to pass initial props to your component. This is optional and you can remove it if you don't use it.
+
+### 5. Test your integration
+
+Make sure you run `yarn start` to run the bundler and then run your android app in Android Studio. The app should load the JavaScript/TypeScript code from the development server and display it in your React Native Fragment in the Activity.
+
+Your app should look like this one:
+
+
diff --git a/website/versioned_docs/version-0.86/integration-with-existing-apps.md b/website/versioned_docs/version-0.86/integration-with-existing-apps.md
new file mode 100644
index 00000000000..d9ea39cf75d
--- /dev/null
+++ b/website/versioned_docs/version-0.86/integration-with-existing-apps.md
@@ -0,0 +1,28 @@
+---
+id: integration-with-existing-apps
+title: Integration with Existing Apps
+hide_table_of_contents: true
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
+
+import IntegrationApple from './\_integration-with-existing-apps-ios.md'; import
+IntegrationKotlin from './\_integration-with-existing-apps-kotlin.md';
+
+React Native is great when you are starting a new mobile app from scratch. However, it also works well for adding a single view or user flow to existing native applications. With a few steps, you can add new React Native based features, screens, views, etc.
+
+The specific steps are different depending on what platform you're targeting.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/website/versioned_docs/version-0.86/interactionmanager.md b/website/versioned_docs/version-0.86/interactionmanager.md
new file mode 100644
index 00000000000..8eac16a4b70
--- /dev/null
+++ b/website/versioned_docs/version-0.86/interactionmanager.md
@@ -0,0 +1,422 @@
+---
+id: interactionmanager
+title: 🗑️ InteractionManager
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+:::warning Deprecated
+Avoid long-running work and use [`requestIdleCallback`](global-requestIdleCallback) instead.
+:::
+
+InteractionManager allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
+
+Applications can schedule tasks to run after interactions with the following:
+
+```tsx
+InteractionManager.runAfterInteractions(() => {
+ // ...long-running synchronous task...
+});
+```
+
+Compare this to other scheduling alternatives:
+
+- `requestAnimationFrame()` for code that animates a view over time.
+- `setImmediate/setTimeout()` run code later, note this may delay animations.
+- `runAfterInteractions()` run code later, without delaying active animations.
+
+The touch handling system considers one or more active touches to be an 'interaction' and will delay `runAfterInteractions()` callbacks until all touches have ended or been cancelled.
+
+InteractionManager also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
+
+```tsx
+const handle = InteractionManager.createInteractionHandle();
+// run animation... (`runAfterInteractions` tasks are queued)
+// later, on animation completion:
+InteractionManager.clearInteractionHandle(handle);
+// queued tasks run if all handles were cleared
+```
+
+`runAfterInteractions` takes either a plain callback function, or a `PromiseTask` object with a `gen` method that returns a `Promise`. If a `PromiseTask` is supplied, then it is fully resolved (including asynchronous dependencies that also schedule more tasks via `runAfterInteractions`) before starting on the next task that might have been queued up synchronously earlier.
+
+By default, queued tasks are executed together in a loop in one `setImmediate` batch. If `setDeadline` is called with a positive number, then tasks will only be executed until the deadline (in terms of js event loop run time) approaches, at which point execution will yield via setTimeout, allowing events such as touches to start interactions and block queued tasks from executing, making apps more responsive.
+
+---
+
+## Example
+
+### Basic
+
+
+
+
+```SnackPlayer name=InteractionManager%20Function%20Component%20Basic%20Example&supportedPlatforms=ios,android&ext=js
+import React, {useEffect} from 'react';
+import {
+ Alert,
+ Animated,
+ InteractionManager,
+ Platform,
+ StyleSheet,
+ Text,
+ useAnimatedValue,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const instructions = Platform.select({
+ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
+ android:
+ 'Double tap R on your keyboard to reload,\n' +
+ 'Shake or press menu button for dev menu',
+});
+
+const useFadeIn = (duration = 5000) => {
+ const opacity = useAnimatedValue(0);
+
+ // Running the animation when the component is mounted
+ useEffect(() => {
+ // Animated.timing() create a interaction handle by default, if you want to disabled that
+ // behaviour you can set isInteraction to false to disabled that.
+ Animated.timing(opacity, {
+ toValue: 1,
+ duration,
+ useNativeDriver: true,
+ }).start();
+ }, [duration, opacity]);
+
+ return opacity;
+};
+
+const Ball = ({onShown}) => {
+ const opacity = useFadeIn();
+
+ // Running a method after the animation
+ useEffect(() => {
+ const interactionPromise = InteractionManager.runAfterInteractions(() =>
+ onShown(),
+ );
+ return () => interactionPromise.cancel();
+ }, [onShown]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+
+ {instructions}
+ Alert.alert('Animation is done')} />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ ball: {
+ width: 100,
+ height: 100,
+ backgroundColor: 'salmon',
+ borderRadius: 100,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=InteractionManager%20Function%20Component%20Basic%20Example&supportedPlatforms=ios,android&ext=tsx
+import React, {useEffect} from 'react';
+import {
+ Alert,
+ Animated,
+ InteractionManager,
+ Platform,
+ StyleSheet,
+ Text,
+ useAnimatedValue,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const instructions = Platform.select({
+ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
+ android:
+ 'Double tap R on your keyboard to reload,\n' +
+ 'Shake or press menu button for dev menu',
+});
+
+const useFadeIn = (duration = 5000) => {
+ const opacity = useAnimatedValue(0);
+
+ // Running the animation when the component is mounted
+ useEffect(() => {
+ // Animated.timing() create a interaction handle by default, if you want to disabled that
+ // behaviour you can set isInteraction to false to disabled that.
+ Animated.timing(opacity, {
+ toValue: 1,
+ duration,
+ useNativeDriver: true,
+ }).start();
+ }, [duration, opacity]);
+
+ return opacity;
+};
+
+type BallProps = {
+ onShown: () => void;
+};
+
+const Ball = ({onShown}: BallProps) => {
+ const opacity = useFadeIn();
+
+ // Running a method after the animation
+ useEffect(() => {
+ const interactionPromise = InteractionManager.runAfterInteractions(() =>
+ onShown(),
+ );
+ return () => interactionPromise.cancel();
+ }, [onShown]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+
+ {instructions}
+ Alert.alert('Animation is done')} />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ ball: {
+ width: 100,
+ height: 100,
+ backgroundColor: 'salmon',
+ borderRadius: 100,
+ },
+});
+
+export default App;
+```
+
+
+
+
+### Advanced
+
+
+
+
+```SnackPlayer name=InteractionManager%20Function%20Component%20Advanced%20Example&supportedPlatforms=ios,android&ext=js
+import React, {useEffect} from 'react';
+import {
+ Alert,
+ Animated,
+ InteractionManager,
+ Platform,
+ StyleSheet,
+ Text,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const instructions = Platform.select({
+ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
+ android:
+ 'Double tap R on your keyboard to reload,\n' +
+ 'Shake or press menu button for dev menu',
+});
+
+// You can create a custom interaction/animation and add
+// support for InteractionManager
+const useCustomInteraction = (timeLocked = 2000) => {
+ useEffect(() => {
+ const handle = InteractionManager.createInteractionHandle();
+
+ setTimeout(
+ () => InteractionManager.clearInteractionHandle(handle),
+ timeLocked,
+ );
+
+ return () => InteractionManager.clearInteractionHandle(handle);
+ }, [timeLocked]);
+};
+
+const Ball = ({onInteractionIsDone}) => {
+ useCustomInteraction();
+
+ // Running a method after the interaction
+ useEffect(() => {
+ InteractionManager.runAfterInteractions(() => onInteractionIsDone());
+ }, [onInteractionIsDone]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+
+ {instructions}
+ Alert.alert('Interaction is done')} />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ ball: {
+ width: 100,
+ height: 100,
+ backgroundColor: 'salmon',
+ borderRadius: 100,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=InteractionManager%20Function%20Component%20Advanced%20Example&supportedPlatforms=ios,android&ext=tsx
+import React, {useEffect} from 'react';
+import {
+ Alert,
+ Animated,
+ InteractionManager,
+ Platform,
+ StyleSheet,
+ Text,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const instructions = Platform.select({
+ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
+ android:
+ 'Double tap R on your keyboard to reload,\n' +
+ 'Shake or press menu button for dev menu',
+});
+
+// You can create a custom interaction/animation and add
+// support for InteractionManager
+const useCustomInteraction = (timeLocked = 2000) => {
+ useEffect(() => {
+ const handle = InteractionManager.createInteractionHandle();
+
+ setTimeout(
+ () => InteractionManager.clearInteractionHandle(handle),
+ timeLocked,
+ );
+
+ return () => InteractionManager.clearInteractionHandle(handle);
+ }, [timeLocked]);
+};
+
+type BallProps = {
+ onInteractionIsDone: () => void;
+};
+
+const Ball = ({onInteractionIsDone}: BallProps) => {
+ useCustomInteraction();
+
+ // Running a method after the interaction
+ useEffect(() => {
+ InteractionManager.runAfterInteractions(() => onInteractionIsDone());
+ }, [onInteractionIsDone]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+
+ {instructions}
+ Alert.alert('Interaction is done')} />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ ball: {
+ width: 100,
+ height: 100,
+ backgroundColor: 'salmon',
+ borderRadius: 100,
+ },
+});
+
+export default App;
+```
+
+
+
+
+# Reference
+
+## Methods
+
+### `runAfterInteractions()`
+
+```tsx
+static runAfterInteractions(task?: (() => any) | SimpleTask | PromiseTask);
+```
+
+Schedule a function to run after all interactions have completed. Returns a cancellable "promise".
+
+---
+
+### `createInteractionHandle()`
+
+```tsx
+static createInteractionHandle(): Handle;
+```
+
+Notify manager that an interaction has started.
+
+---
+
+### `clearInteractionHandle()`
+
+```tsx
+static clearInteractionHandle(handle: Handle);
+```
+
+Notify manager that an interaction has completed.
+
+---
+
+### `setDeadline()`
+
+```tsx
+static setDeadline(deadline: number);
+```
+
+A positive number will use setTimeout to schedule any tasks after the eventLoopRunningTime hits the deadline value, otherwise all tasks will be executed in one setImmediate batch (default).
diff --git a/website/versioned_docs/version-0.86/intro-react-native-components.md b/website/versioned_docs/version-0.86/intro-react-native-components.md
new file mode 100644
index 00000000000..eb585964154
--- /dev/null
+++ b/website/versioned_docs/version-0.86/intro-react-native-components.md
@@ -0,0 +1,87 @@
+---
+id: intro-react-native-components
+title: Core Components and Native Components
+description: 'React Native lets you compose app interfaces using Native Components. Conveniently, it comes with a set of these components for you to get started with right now—the Core Components!'
+---
+
+import ThemedImage from '@theme/ThemedImage';
+
+React Native is an open source framework for building Android and iOS applications using [React](https://react.dev/) and the app platform’s native capabilities. With React Native, you use JavaScript to access your platform’s APIs as well as to describe the appearance and behavior of your UI using React components: bundles of reusable, nestable code. You can learn more about React in the next section. But first, let’s cover how components work in React Native.
+
+## Views and mobile development
+
+In Android and iOS development, a **view** is the basic building block of UI: a small rectangular element on the screen which can be used to display text, images, or respond to user input. Even the smallest visual elements of an app, like a line of text or a button, are kinds of views. Some kinds of views can contain other views. It’s views all the way down!
+
+
+
+ Just a sampling of the many views used in Android and iOS apps.
+
+
+## Native Components
+
+In Android development, you write views in Kotlin or Java; in iOS development, you use Swift or Objective-C. With React Native, you can invoke these views with JavaScript using React components. At runtime, React Native creates the corresponding Android and iOS views for those components. Because React Native components are backed by the same views as Android and iOS, React Native apps look, feel, and perform like any other apps. We call these platform-backed components **Native Components.**
+
+React Native comes with a set of essential, ready-to-use Native Components you can use to start building your app today. These are React Native's **Core Components**.
+
+:::caution
+This documentation references a legacy set of API and needs to be updated to reflect the New Architecture
+:::
+React Native also lets you build your own Native Components for [Android](legacy/native-components-android.md) and [iOS](legacy/native-components-ios.md) to suit your app’s unique needs. We also have a thriving ecosystem of these **community-contributed components.** Check out [Native Directory](https://reactnative.directory) to find what the community has been creating.
+
+## Core Components
+
+React Native has many Core Components for everything from controls to activity indicators. You can find them all [documented in the API section](components-and-apis). You will mostly work with the following Core Components:
+
+| React Native UI Component | Android View | iOS View | Web Analog | Description |
+| ------------------------- | -------------- | ---------------- | ----------------------- | ----------------------------------------------------------------------------------------------------- |
+| `` | `` | `` | A non-scrolling `
` | A container that supports layout with flexbox, style, some touch handling, and accessibility controls |
+| `` | `` | `` | `
` | Displays, styles, and nests strings of text and even handles touch events |
+| `` | `` | `` | `` | Displays different types of images |
+| `` | `` | `` | `
` | A generic scrolling container that can contain multiple components and views |
+| `` | `` | `` | `` | Allows the user to enter text |
+
+In the next section, you will start combining these Core Components to learn about how React works. Have a play with them here now!
+
+```SnackPlayer name=Hello%20World
+import React from 'react';
+import {View, Text, Image, ScrollView, TextInput} from 'react-native';
+
+const App = () => {
+ return (
+
+ Some text
+
+ Some more text
+
+
+
+
+ );
+};
+
+export default App;
+```
+
+---
+
+Because React Native uses the same API structure as React components, you’ll need to understand React component APIs to get started. The [next section](intro-react) makes for a quick introduction or refresher on the topic. However, if you’re already familiar with React, feel free to [skip ahead](handling-text-input).
+
+
diff --git a/website/versioned_docs/version-0.86/intro-react.md b/website/versioned_docs/version-0.86/intro-react.md
new file mode 100644
index 00000000000..962b4b3d256
--- /dev/null
+++ b/website/versioned_docs/version-0.86/intro-react.md
@@ -0,0 +1,486 @@
+---
+id: intro-react
+title: React Fundamentals
+description: To understand React Native fully, you need a solid foundation in React. This short introduction to React can help you get started or get refreshed.
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+React Native runs on [React](https://react.dev/), a popular open source library for building user interfaces with JavaScript. To make the most of React Native, it helps to understand React itself. This section can get you started or can serve as a refresher course.
+
+We’re going to cover the core concepts behind React:
+
+- components
+- JSX
+- props
+- state
+
+If you want to dig deeper, we encourage you to check out [React’s official documentation](https://react.dev/learn).
+
+## Your first component
+
+The rest of this introduction to React uses cats in its examples: friendly, approachable creatures that need names and a cafe to work in. Here is your very first Cat component:
+
+```SnackPlayer name=Your%20Cat
+import React from 'react';
+import {Text} from 'react-native';
+
+const Cat = () => {
+ return Hello, I am your cat!;
+};
+
+export default Cat;
+```
+
+Here is how you do it: To define your `Cat` component, first use JavaScript’s [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) to import React and React Native’s [`Text`](/docs/next/text) Core Component:
+
+```tsx
+import React from 'react';
+import {Text} from 'react-native';
+```
+
+Your component starts as a function:
+
+```tsx
+const Cat = () => {};
+```
+
+You can think of components as blueprints. Whatever a function component returns is rendered as a **React element.** React elements let you describe what you want to see on the screen.
+
+Here the `Cat` component will render a `` element:
+
+```tsx
+const Cat = () => {
+ return Hello, I am your cat!;
+};
+```
+
+You can export your function component with JavaScript’s [`export default`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) for use throughout your app like so:
+
+```tsx
+const Cat = () => {
+ return Hello, I am your cat!;
+};
+
+export default Cat;
+```
+
+:::tip
+This is one of many ways to export your component. This kind of export works well with the Snack Player. However, depending on your app’s file structure, you might need to use a different convention. This [handy cheatsheet on JavaScript imports and exports](https://medium.com/dailyjs/javascript-module-cheatsheet-7bd474f1d829) can help.
+:::
+
+Now take a closer look at that `return` statement. `Hello, I am your cat!` is using a kind of JavaScript syntax that makes writing elements convenient: JSX.
+
+## JSX
+
+React and React Native use **JSX,** a syntax that lets you write elements inside JavaScript like so: `Hello, I am your cat!`. The React docs have [a comprehensive guide to JSX](https://react.dev/learn/writing-markup-with-jsx) you can refer to learn even more. Because JSX is JavaScript, you can use variables inside it. Here you are declaring a name for the cat, `name`, and embedding it with curly braces inside ``.
+
+```SnackPlayer name=Curly%20Braces
+import React from 'react';
+import {Text} from 'react-native';
+
+const Cat = () => {
+ const name = 'Maru';
+ return Hello, I am {name}!;
+};
+
+export default Cat;
+```
+
+Any JavaScript expression will work between curly braces, including function calls like `{getFullName("Rum", "Tum", "Tugger")}`:
+
+
+
+
+```SnackPlayer name=Curly%20Braces&ext=js
+import React from 'react';
+import {Text} from 'react-native';
+
+const getFullName = (firstName, secondName, thirdName) => {
+ return firstName + ' ' + secondName + ' ' + thirdName;
+};
+
+const Cat = () => {
+ return Hello, I am {getFullName('Rum', 'Tum', 'Tugger')}!;
+};
+
+export default Cat;
+```
+
+
+
+
+```SnackPlayer name=Curly%20Braces&ext=tsx
+import React from 'react';
+import {Text} from 'react-native';
+
+const getFullName = (
+ firstName: string,
+ secondName: string,
+ thirdName: string,
+) => {
+ return firstName + ' ' + secondName + ' ' + thirdName;
+};
+
+const Cat = () => {
+ return Hello, I am {getFullName('Rum', 'Tum', 'Tugger')}!;
+};
+
+export default Cat;
+```
+
+
+
+
+You can think of curly braces as creating a portal into JS functionality in your JSX!
+
+:::tip
+Because JSX is included in the React library, it won’t work if you don’t have `import React from 'react'` at the top of your file!
+:::
+
+## Custom Components
+
+You’ve already met [React Native’s Core Components](intro-react-native-components). React lets you nest these components inside each other to create new components. These nestable, reusable components are at the heart of the React paradigm.
+
+For example, you can nest [`Text`](text) and [`TextInput`](textinput) inside a [`View`](view) below, and React Native will render them together:
+
+```SnackPlayer name=Custom%20Components
+import React from 'react';
+import {Text, TextInput, View} from 'react-native';
+
+const Cat = () => {
+ return (
+
+ Hello, I am...
+
+
+ );
+};
+
+export default Cat;
+```
+
+#### Developer notes
+
+
+
+
+
+:::info
+If you’re familiar with web development, `` and `` might remind you of HTML! You can think of them as the `
` and `
` tags of application development.
+:::
+
+
+
+
+:::info
+On Android, you usually put your views inside `LinearLayout`, `FrameLayout`, `RelativeLayout`, etc. to define how the view’s children will be arranged on the screen. In React Native, `View` uses Flexbox for its children’s layout. You can learn more in [our guide to layout with Flexbox](flexbox).
+:::
+
+
+
+
+You can render this component multiple times and in multiple places without repeating your code by using ``:
+
+```SnackPlayer name=Multiple%20Components
+import React from 'react';
+import {Text, View} from 'react-native';
+
+const Cat = () => {
+ return (
+
+ I am also a cat!
+
+ );
+};
+
+const Cafe = () => {
+ return (
+
+ Welcome!
+
+
+
+
+ );
+};
+
+export default Cafe;
+```
+
+Any component that renders other components is a **parent component.** Here, `Cafe` is the parent component and each `Cat` is a **child component.**
+
+You can put as many cats in your cafe as you like. Each `` renders a unique element—which you can customize with props.
+
+## Props
+
+**Props** is short for “properties”. Props let you customize React components. For example, here you pass each `` a different `name` for `Cat` to render:
+
+
+
+
+```SnackPlayer name=Multiple%20Props&ext=js
+import React from 'react';
+import {Text, View} from 'react-native';
+
+const Cat = props => {
+ return (
+
+ Hello, I am {props.name}!
+
+ );
+};
+
+const Cafe = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default Cafe;
+```
+
+
+
+
+```SnackPlayer name=Multiple%20Props&ext=tsx
+import React from 'react';
+import {Text, View} from 'react-native';
+
+type CatProps = {
+ name: string;
+};
+
+const Cat = (props: CatProps) => {
+ return (
+
+ Hello, I am {props.name}!
+
+ );
+};
+
+const Cafe = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default Cafe;
+```
+
+
+
+
+Most of React Native’s Core Components can be customized with props, too. For example, when using [`Image`](image), you pass it a prop named [`source`](image#source) to define what image it shows:
+
+```SnackPlayer name=Props
+import React from 'react';
+import {Text, View, Image} from 'react-native';
+
+const CatApp = () => {
+ return (
+
+
+ Hello, I am your cat!
+
+ );
+};
+
+export default CatApp;
+```
+
+`Image` has [many different props](image#props), including [`style`](image#style), which accepts a JS object of design and layout related property-value pairs.
+
+:::note
+Notice the double curly braces `{{ }}` surrounding `style`‘s width and height. In JSX, JavaScript values are referenced with `{}`. This is handy if you are passing something other than a string as props, like an array or number: ``. However, JS objects are **_also_** denoted with curly braces: `{width: 200, height: 200}`. Therefore, to pass a JS object in JSX, you must wrap the object in **another pair** of curly braces: `{{width: 200, height: 200}}`
+:::
+
+You can build many things with props and the Core Components [`Text`](text), [`Image`](image), and [`View`](view)! But to build something interactive, you’ll need state.
+
+## State
+
+While you can think of props as arguments you use to configure how components render, **state** is like a component’s personal data storage. State is useful for handling data that changes over time or that comes from user interaction. State gives your components memory!
+
+:::info
+As a general rule, use props to configure a component when it renders. Use state to keep track of any component data that you expect to change over time.
+:::
+
+The following example takes place in a cat cafe where two hungry cats are waiting to be fed. Their hunger, which we expect to change over time (unlike their names), is stored as state. To feed the cats, press their buttons—which will update their state.
+
+You can add state to a component by calling [React’s `useState` Hook](https://react.dev/learn/state-a-components-memory). A Hook is a kind of function that lets you “hook into” React features. For example, `useState` is a Hook that lets you add state to function components. You can learn more about [other kinds of Hooks in the React documentation.](https://react.dev/reference/react)
+
+
+
+
+```SnackPlayer name=State&ext=js
+import React, {useState} from 'react';
+import {Button, Text, View} from 'react-native';
+
+const Cat = props => {
+ const [isHungry, setIsHungry] = useState(true);
+
+ return (
+
+
+ I am {props.name}, and I am {isHungry ? 'hungry' : 'full'}!
+
+ {
+ setIsHungry(false);
+ }}
+ disabled={!isHungry}
+ title={isHungry ? 'Give me some food, please!' : 'Thank you!'}
+ />
+
+ );
+};
+
+const Cafe = () => {
+ return (
+ <>
+
+
+ >
+ );
+};
+
+export default Cafe;
+```
+
+
+
+
+```SnackPlayer name=State&ext=tsx
+import React, {useState} from 'react';
+import {Button, Text, View} from 'react-native';
+
+type CatProps = {
+ name: string;
+};
+
+const Cat = (props: CatProps) => {
+ const [isHungry, setIsHungry] = useState(true);
+
+ return (
+
+
+ I am {props.name}, and I am {isHungry ? 'hungry' : 'full'}!
+
+ {
+ setIsHungry(false);
+ }}
+ disabled={!isHungry}
+ title={isHungry ? 'Give me some food, please!' : 'Thank you!'}
+ />
+
+ );
+};
+
+const Cafe = () => {
+ return (
+ <>
+
+
+ >
+ );
+};
+
+export default Cafe;
+```
+
+
+
+
+First, you will want to import `useState` from React like so:
+
+```tsx
+import React, {useState} from 'react';
+```
+
+Then you declare the component’s state by calling `useState` inside its function. In this example, `useState` creates an `isHungry` state variable:
+
+```tsx
+const Cat = (props: CatProps) => {
+ const [isHungry, setIsHungry] = useState(true);
+ // ...
+};
+```
+
+:::tip
+You can use `useState` to track any kind of data: strings, numbers, Booleans, arrays, objects. For example, you can track the number of times a cat has been petted with `const [timesPetted, setTimesPetted] = useState(0)`!
+:::
+
+Calling `useState` does two things:
+
+- it creates a “state variable” with an initial value—in this case the state variable is `isHungry` and its initial value is `true`
+- it creates a function to set that state variable’s value—`setIsHungry`
+
+It doesn’t matter what names you use. But it can be handy to think of the pattern as `[, ] = useState()`.
+
+Next you add the [`Button`](button) Core Component and give it an `onPress` prop:
+
+```tsx
+ {
+ setIsHungry(false);
+ }}
+ //..
+/>
+```
+
+Now, when someone presses the button, `onPress` will fire, calling the `setIsHungry(false)`. This sets the state variable `isHungry` to `false`. When `isHungry` is false, the `Button`’s `disabled` prop is set to `true` and its `title` also changes:
+
+```tsx
+
+```
+
+:::info
+You might’ve noticed that although `isHungry` is a [const](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/const), it is seemingly reassignable! The `const` keyword here does not mean that the state itself is immutable. Rather, it means that the reference to the object, that contains the state and the function to update it, will not change.
+What is happening is when a state-setting function like `setIsHungry` is called, its component will re-render. In this case the `Cat` function will run again—and this time, `useState` will give us the next value of `isHungry`.
+:::
+
+Finally, put your cats inside a `Cafe` component:
+
+```tsx
+const Cafe = () => {
+ return (
+ <>
+
+
+ >
+ );
+};
+```
+
+:::info
+See the `<>` and `>` above? These bits of JSX are [fragments](https://react.dev/reference/react/Fragment). Adjacent JSX elements must be wrapped in an enclosing tag. Fragments let you do that without nesting an extra, unnecessary wrapping element like `View`.
+:::
+
+---
+
+Now that you’ve covered both React and React Native’s Core Components, let’s dive deeper on some of these core components by looking at [handling ``](handling-text-input).
diff --git a/website/versioned_docs/version-0.86/introduction.md b/website/versioned_docs/version-0.86/introduction.md
new file mode 100644
index 00000000000..ba782cd838c
--- /dev/null
+++ b/website/versioned_docs/version-0.86/introduction.md
@@ -0,0 +1,93 @@
+---
+id: getting-started
+title: Introduction
+description: This helpful guide lays out the prerequisites for learning React Native, using these docs, and setting up your environment.
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+
+ Welcome to the very start of your React Native journey! If you're looking for getting started instructions, they've moved to their own section. Continue reading for an introduction to the documentation, Native Components, React, and more!
+
+
+
+Many different kinds of people use React Native: from advanced iOS developers to React beginners, to people getting started programming for the first time in their career. These docs were written for all learners, no matter their experience level or background.
+
+## How to use these docs
+
+You can start here and read through these docs linearly like a book; or you can read the specific sections you need. Already familiar with React? You can skip [that section](intro-react)—or read it for a light refresher.
+
+## Prerequisites
+
+To work with React Native, you will need to have an understanding of JavaScript fundamentals. If you’re new to JavaScript or need a refresher, you can [dive in](https://developer.mozilla.org/en-US/docs/Web/JavaScript) or [brush up](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript) at Mozilla Developer Network.
+
+:::info
+While we do our best to assume no prior knowledge of React, Android, or iOS development, these are valuable topics of study for the aspiring React Native developer. Where sensible, we have linked to resources and articles that go more in depth.
+:::
+
+## Interactive examples
+
+This introduction lets you get started immediately in your browser with interactive examples like this one:
+
+```SnackPlayer name=Hello%20World
+import React from 'react';
+import {Text, View} from 'react-native';
+
+const YourApp = () => {
+ return (
+
+ Try editing me! 🎉
+
+ );
+};
+
+export default YourApp;
+```
+
+The above is a Snack Player. It’s a handy tool created by Expo to embed and run React Native projects and share how they render in platforms like Android and iOS. The code is live and editable, so you can play directly with it in your browser. Go ahead and try changing the "Try editing me!" text above to "Hello, world!"
+
+:::tip
+Optionally, if you want to set up a local development environment, [you can follow our guide to setting up your environment on your local machine](set-up-your-environment) and paste the code examples into your project. (If you are a web developer, you may already have a local environment set up for mobile browser testing!)
+:::
+
+## Developer Notes
+
+People from many different development backgrounds are learning React Native. You may have experience with a range of technologies, from web to Android to iOS and more. We try to write for developers from all backgrounds. Sometimes we provide explanations specific to one platform or another like so:
+
+
+
+
+
+:::info
+Android developers may be familiar with this concept.
+:::
+
+
+
+
+:::info
+iOS developers may be familiar with this concept.
+:::
+
+
+
+
+:::info
+Web developers may be familiar with this concept.
+:::
+
+
+
+
+## Formatting
+
+Menu paths are written in bold and use carets to navigate submenus. Example: **Android Studio > Preferences**
+
+---
+
+Now that you know how this guide works, it's time to get to know the foundation of React Native: [Native Components](intro-react-native-components.md).
diff --git a/website/versioned_docs/version-0.86/javascript-environment.md b/website/versioned_docs/version-0.86/javascript-environment.md
new file mode 100644
index 00000000000..ab041dd34cd
--- /dev/null
+++ b/website/versioned_docs/version-0.86/javascript-environment.md
@@ -0,0 +1,109 @@
+---
+id: javascript-environment
+title: JavaScript Environment
+---
+
+import TableRow from '@site/core/TableRowWithCodeBlock';
+
+## JavaScript Runtime
+
+When using React Native, you're going to be running your JavaScript code in up to three environments:
+
+- In most cases, React Native will use [Hermes](hermes), an open-source JavaScript engine optimized for React Native.
+- If Hermes is disabled, React Native will use [JavaScriptCore](https://trac.webkit.org/wiki/JavaScriptCore), the JavaScript engine that powers Safari. Note that on iOS, JavaScriptCore does not use JIT due to the absence of writable executable memory in iOS apps.
+- When using Chrome debugging, all JavaScript code runs within Chrome itself, communicating with native code via WebSockets. Chrome uses [V8](https://v8.dev/) as its JavaScript engine.
+
+While these environments are very similar, you may end up hitting some inconsistencies. It is best to avoid relying on specifics of any runtime.
+
+## JavaScript Syntax Transformers
+
+Syntax transformers make writing code more enjoyable by allowing you to use new JavaScript syntax without having to wait for support on all interpreters.
+
+React Native ships with the [Babel JavaScript compiler](https://babeljs.io). Check [Babel documentation](https://babeljs.io/docs/plugins/#transform-plugins) on its supported transformations for more details.
+
+A full list of React Native's enabled transformations can be found in [@react-native/babel-preset](https://github.com/facebook/react-native/tree/main/packages/react-native-babel-preset).
+
+
+
+
Transformation
Code
+
+
+
ECMAScript 5
+
+
ECMAScript 2015 (ES6)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ECMAScript 2016 (ES7)
+
+
ECMAScript 2017 (ES8)
+
+
+
ECMAScript 2018 (ES9)
+
+
ECMAScript 2019 (ES10)
+
+
ECMAScript 2020 (ES11)
+
+
+
+
ECMAScript 2022 (ES13)
+
+
Stage 1 Proposal
+
+
Miscellaneous
+
+
+
+
+
+
+
+
+
+
+## Polyfills
+
+Many standard functions are also available on all the supported JavaScript runtimes.
+
+#### Browser
+
+- [CommonJS `require`](https://nodejs.org/docs/latest/api/modules.html)
+- `md [console.{log, warn, error, info, debug, trace, table, group, groupCollapsed, groupEnd}](https://developer.chrome.com/devtools/docs/console-api)`
+- [`XMLHttpRequest`, `fetch`](network.md#content)
+- [`{set, clear}{Timeout, Interval, Immediate}, {request, cancel}AnimationFrame`](timers.md#content)
+
+#### ECMAScript 2015 (ES6)
+
+- [`Array.from`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)
+- `md Array.prototype.{[find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find), [findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex)}`
+- [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+- `md String.prototype.{[startsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith), [endsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith), [repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat), [includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)}`
+
+#### ECMAScript 2016 (ES7)
+
+- `md Array.prototype.[includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes)`
+
+#### ECMAScript 2017 (ES8)
+
+- `md Object.{[entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries), [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values)}`
+
+#### Specific
+
+- `__DEV__`
diff --git a/website/versioned_docs/version-0.86/keyboard.md b/website/versioned_docs/version-0.86/keyboard.md
new file mode 100644
index 00000000000..8560ce4999d
--- /dev/null
+++ b/website/versioned_docs/version-0.86/keyboard.md
@@ -0,0 +1,146 @@
+---
+id: keyboard
+title: Keyboard
+---
+
+`Keyboard` module to control keyboard events.
+
+### Usage
+
+The Keyboard module allows you to listen for native events and react to them, as well as make changes to the keyboard, like dismissing it.
+
+```SnackPlayer name=Keyboard%20Example&supportedPlatforms=ios,android
+import React, {useState, useEffect} from 'react';
+import {Keyboard, Text, TextInput, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const Example = () => {
+ const [keyboardStatus, setKeyboardStatus] = useState('Keyboard Hidden');
+
+ useEffect(() => {
+ const showSubscription = Keyboard.addListener('keyboardDidShow', () => {
+ setKeyboardStatus('Keyboard Shown');
+ });
+ const hideSubscription = Keyboard.addListener('keyboardDidHide', () => {
+ setKeyboardStatus('Keyboard Hidden');
+ });
+
+ return () => {
+ showSubscription.remove();
+ hideSubscription.remove();
+ };
+ }, []);
+
+ return (
+
+
+
+ {keyboardStatus}
+
+
+ );
+};
+
+const style = StyleSheet.create({
+ container: {
+ flex: 1,
+ padding: 36,
+ },
+ input: {
+ padding: 10,
+ borderWidth: 0.5,
+ borderRadius: 4,
+ },
+ status: {
+ padding: 16,
+ textAlign: 'center',
+ },
+});
+
+export default Example;
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `addListener()`
+
+```tsx
+static addListener: (
+ eventType: KeyboardEventName,
+ listener: KeyboardEventListener,
+) => EmitterSubscription;
+```
+
+The `addListener` function connects a JavaScript function to an identified native keyboard notification event.
+
+This function then returns the reference to the listener.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ------------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------ |
+| eventName
Required
| string | The string that identifies the event you're listening for. See the list below. |
+| callback
Required
| function | The function to be called when the event fires |
+
+**`eventName`**
+
+This can be any of the following:
+
+- `keyboardWillShow`
+- `keyboardDidShow`
+- `keyboardWillHide`
+- `keyboardDidHide`
+- `keyboardWillChangeFrame`
+- `keyboardDidChangeFrame`
+
+:::note
+Only `keyboardDidShow` and `keyboardDidHide` events are available on Android. The events will not be fired when using Android 10 or below if your activity has `android:windowSoftInputMode` set to `adjustResize` or `adjustNothing`.
+:::
+
+---
+
+### `dismiss()`
+
+```tsx
+static dismiss();
+```
+
+Dismisses the active keyboard and removes focus.
+
+---
+
+### `scheduleLayoutAnimation`
+
+```tsx
+static scheduleLayoutAnimation(event: KeyboardEvent);
+```
+
+Useful for syncing TextInput (or other keyboard accessory view) size of position changes with keyboard movements.
+
+---
+
+### `isVisible()`
+
+```tsx
+static isVisible(): boolean;
+```
+
+Whether the keyboard is last known to be visible.
+
+---
+
+### `metrics()`
+
+```tsx
+static metrics(): KeyboardMetrics | undefined;
+```
+
+Return the metrics of the soft-keyboard if visible.
diff --git a/website/versioned_docs/version-0.86/keyboardavoidingview.md b/website/versioned_docs/version-0.86/keyboardavoidingview.md
new file mode 100644
index 00000000000..55cce32cf54
--- /dev/null
+++ b/website/versioned_docs/version-0.86/keyboardavoidingview.md
@@ -0,0 +1,122 @@
+---
+id: keyboardavoidingview
+title: KeyboardAvoidingView
+---
+
+This component will automatically adjust its height, position, or bottom padding based on the keyboard height to remain visible while the virtual keyboard is displayed.
+
+## Example
+
+```SnackPlayer name=KeyboardAvoidingView&supportedPlatforms=android,ios
+import React from 'react';
+import {
+ View,
+ KeyboardAvoidingView,
+ TextInput,
+ StyleSheet,
+ Text,
+ Platform,
+ TouchableWithoutFeedback,
+ Button,
+ Keyboard,
+} from 'react-native';
+
+const KeyboardAvoidingComponent = () => {
+ return (
+
+
+
+ Header
+
+
+ null} />
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ inner: {
+ padding: 24,
+ flex: 1,
+ justifyContent: 'space-around',
+ },
+ header: {
+ fontSize: 36,
+ marginBottom: 48,
+ },
+ textInput: {
+ height: 40,
+ borderColor: '#000000',
+ borderBottomWidth: 1,
+ marginBottom: 36,
+ },
+ btnContainer: {
+ backgroundColor: 'white',
+ marginTop: 12,
+ },
+});
+
+export default KeyboardAvoidingComponent;
+```
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view.md#props).
+
+---
+
+### `behavior`
+
+Specify how to react to the presence of the keyboard.
+
+:::note
+Android and iOS both interact with this prop differently. On both iOS and Android, setting `behavior` is recommended.
+:::
+
+| Type |
+| ------------------------------------------- |
+| enum(`'height'`, `'position'`, `'padding'`) |
+
+---
+
+### `contentContainerStyle`
+
+The style of the content container (View) when behavior is `'position'`.
+
+| Type |
+| --------------------------------- |
+| [View Style](view-style-props.md) |
+
+---
+
+### `enabled`
+
+Enabled or disabled KeyboardAvoidingView.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `true` |
+
+---
+
+### `keyboardVerticalOffset`
+
+This is the distance between the top of the user screen and the react native view, may be non-zero in some use cases.
+
+| Type | Default |
+| ------ | ------- |
+| number | `0` |
diff --git a/website/versioned_docs/version-0.86/layout-props.md b/website/versioned_docs/version-0.86/layout-props.md
new file mode 100644
index 00000000000..b3673e0c849
--- /dev/null
+++ b/website/versioned_docs/version-0.86/layout-props.md
@@ -0,0 +1,1360 @@
+---
+id: layout-props
+title: Layout Props
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+:::info
+More detailed examples about those properties can be found on the [Layout with Flexbox](flexbox) page.
+:::
+
+### Example
+
+The following example shows how different properties can affect or shape a React Native layout. You can try for example to add or remove squares from the UI while changing the values of the property `flexWrap`.
+
+
+
+
+```SnackPlayer name=LayoutProps%20Example&ext=js
+import React, {useState} from 'react';
+import {Button, ScrollView, StyleSheet, Text, View} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [flexDirection, setFlexDirection] = useState(0);
+ const [justifyContent, setJustifyContent] = useState(0);
+ const [alignItems, setAlignItems] = useState(0);
+ const [direction, setDirection] = useState(0);
+ const [wrap, setWrap] = useState(0);
+
+ const [squares, setSquares] = useState([, , ]);
+
+ const hookedStyles = {
+ flexDirection: flexDirections[flexDirection],
+ justifyContent: justifyContents[justifyContent],
+ alignItems: alignItemsArr[alignItems],
+ direction: directions[direction],
+ flexWrap: wraps[wrap],
+ };
+
+ const changeSetting = (value, options, setterFunction) => {
+ if (value === options.length - 1) {
+ setterFunction(0);
+ return;
+ }
+ setterFunction(value + 1);
+ };
+
+ return (
+
+
+
+ {squares.map(elem => elem)}
+
+
+
+
+
+ changeSetting(flexDirection, flexDirections, setFlexDirection)
+ }
+ />
+ {flexDirections[flexDirection]}
+
+
+
+ changeSetting(
+ justifyContent,
+ justifyContents,
+ setJustifyContent,
+ )
+ }
+ />
+ {justifyContents[justifyContent]}
+
+
+
+ changeSetting(alignItems, alignItemsArr, setAlignItems)
+ }
+ />
+ {alignItemsArr[alignItems]}
+
+
+
+ changeSetting(direction, directions, setDirection)
+ }
+ />
+ {directions[direction]}
+
+
+ changeSetting(wrap, wraps, setWrap)}
+ />
+ {wraps[wrap]}
+
+
+ setSquares([...squares, ])}
+ />
+
+
+
+ setSquares(squares.filter((v, i) => i !== squares.length - 1))
+ }
+ />
+
+
+
+
+
+ );
+};
+
+const flexDirections = ['row', 'row-reverse', 'column', 'column-reverse'];
+const justifyContents = [
+ 'flex-start',
+ 'flex-end',
+ 'center',
+ 'space-between',
+ 'space-around',
+ 'space-evenly',
+];
+const alignItemsArr = [
+ 'flex-start',
+ 'flex-end',
+ 'center',
+ 'stretch',
+ 'baseline',
+];
+const wraps = ['nowrap', 'wrap', 'wrap-reverse'];
+const directions = ['inherit', 'ltr', 'rtl'];
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ layoutContainer: {
+ flex: 0.5,
+ },
+ playingSpace: {
+ backgroundColor: 'white',
+ borderColor: 'blue',
+ borderWidth: 3,
+ overflow: 'hidden',
+ },
+ controlSpace: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ buttonView: {
+ width: '50%',
+ padding: 10,
+ },
+ text: {
+ textAlign: 'center',
+ },
+});
+
+const Square = () => (
+
+);
+
+const randomHexColor = () => {
+ return '#000000'.replace(/0/g, () => {
+ return Math.round(Math.random() * 14).toString(16);
+ });
+};
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=LayoutProps%20Example&ext=tsx
+import React, {useState} from 'react';
+import {
+ Button,
+ ScrollView,
+ StyleSheet,
+ Text,
+ View,
+ FlexAlignType,
+ FlexStyle,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [flexDirection, setFlexDirection] = useState(0);
+ const [justifyContent, setJustifyContent] = useState(0);
+ const [alignItems, setAlignItems] = useState(0);
+ const [direction, setDirection] = useState(0);
+ const [wrap, setWrap] = useState(0);
+
+ const [squares, setSquares] = useState([, , ]);
+
+ const hookedStyles = {
+ flexDirection: flexDirections[flexDirection],
+ justifyContent: justifyContents[justifyContent],
+ alignItems: alignItemsArr[alignItems],
+ direction: directions[direction],
+ flexWrap: wraps[wrap],
+ } as FlexStyle;
+
+ const changeSetting = (
+ value: number,
+ options: any[],
+ setterFunction: (index: number) => void,
+ ) => {
+ if (value === options.length - 1) {
+ setterFunction(0);
+ return;
+ }
+ setterFunction(value + 1);
+ };
+
+ return (
+
+
+
+ {squares.map(elem => elem)}
+
+
+
+
+
+ changeSetting(flexDirection, flexDirections, setFlexDirection)
+ }
+ />
+ {flexDirections[flexDirection]}
+
+
+
+ changeSetting(
+ justifyContent,
+ justifyContents,
+ setJustifyContent,
+ )
+ }
+ />
+ {justifyContents[justifyContent]}
+
+
+
+ changeSetting(alignItems, alignItemsArr, setAlignItems)
+ }
+ />
+ {alignItemsArr[alignItems]}
+
+
+
+ changeSetting(direction, directions, setDirection)
+ }
+ />
+ {directions[direction]}
+
+
+ changeSetting(wrap, wraps, setWrap)}
+ />
+ {wraps[wrap]}
+
+
+ setSquares([...squares, ])}
+ />
+
+
+
+ setSquares(squares.filter((v, i) => i !== squares.length - 1))
+ }
+ />
+
+
+
+
+
+ );
+};
+
+const flexDirections = [
+ 'row',
+ 'row-reverse',
+ 'column',
+ 'column-reverse',
+] as FlexStyle['flexDirection'][];
+const justifyContents = [
+ 'flex-start',
+ 'flex-end',
+ 'center',
+ 'space-between',
+ 'space-around',
+ 'space-evenly',
+] as FlexStyle['justifyContent'][];
+const alignItemsArr = [
+ 'flex-start',
+ 'flex-end',
+ 'center',
+ 'stretch',
+ 'baseline',
+] as FlexAlignType[];
+const wraps = ['nowrap', 'wrap', 'wrap-reverse'];
+const directions = ['inherit', 'ltr', 'rtl'];
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ layoutContainer: {
+ flex: 0.5,
+ },
+ playingSpace: {
+ backgroundColor: 'white',
+ borderColor: 'blue',
+ borderWidth: 3,
+ overflow: 'hidden',
+ },
+ controlSpace: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ },
+ buttonView: {
+ width: '50%',
+ padding: 10,
+ },
+ text: {
+ textAlign: 'center',
+ },
+});
+
+const Square = () => (
+
+);
+
+const randomHexColor = () => {
+ return '#000000'.replace(/0/g, () => {
+ return Math.round(Math.random() * 14).toString(16);
+ });
+};
+
+export default App;
+```
+
+
+
+
+---
+
+# Reference
+
+## Props
+
+### `alignContent`
+
+`alignContent` controls how rows align in the cross direction, overriding the `alignContent` of the parent.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content) for more details.
+
+| Type | Required |
+| ---------------------------------------------------------------------------------------------------- | -------- |
+| enum('flex-start', 'flex-end', 'center', 'stretch', 'space-between', 'space-around', 'space-evenly') | No |
+
+---
+
+### `alignItems`
+
+`alignItems` aligns children in the cross direction. For example, if children are flowing vertically, `alignItems` controls how they align horizontally. It works like `align-items` in CSS (default: stretch).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) for more details.
+
+| Type | Required |
+| --------------------------------------------------------------- | -------- |
+| enum('flex-start', 'flex-end', 'center', 'stretch', 'baseline') | No |
+
+---
+
+### `alignSelf`
+
+`alignSelf` controls how a child aligns in the cross direction, overriding the `alignItems` of the parent. It works like `align-self` in CSS (default: auto).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) for more details.
+
+| Type | Required |
+| ----------------------------------------------------------------------- | -------- |
+| enum('auto', 'flex-start', 'flex-end', 'center', 'stretch', 'baseline') | No |
+
+---
+
+### `aspectRatio`
+
+Aspect ratio controls the size of the undefined dimension of a node.
+
+- On a node with a set width/height, aspect ratio controls the size of the unset dimension
+- On a node with a set flex basis, aspect ratio controls the size of the node in the cross axis if unset
+- On a node with a measure function, aspect ratio works as though the measure function measures the flex basis
+- On a node with flex grow/shrink, aspect ratio controls the size of the node in the cross axis if unset
+- Aspect ratio takes min/max dimensions into account
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `borderBottomWidth`
+
+`borderBottomWidth` works like `border-bottom-width` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderEndWidth`
+
+When direction is `ltr`, `borderEndWidth` is equivalent to `borderRightWidth`. When direction is `rtl`, `borderEndWidth` is equivalent to `borderLeftWidth`.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderLeftWidth`
+
+`borderLeftWidth` works like `border-left-width` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderRightWidth`
+
+`borderRightWidth` works like `border-right-width` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderStartWidth`
+
+When direction is `ltr`, `borderStartWidth` is equivalent to `borderLeftWidth`. When direction is `rtl`, `borderStartWidth` is equivalent to `borderRightWidth`.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderTopWidth`
+
+`borderTopWidth` works like `border-top-width` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `borderWidth`
+
+`borderWidth` works like `border-width` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-width) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `bottom`
+
+`bottom` is the number of logical pixels to offset the bottom edge of this component.
+
+It works similarly to `bottom` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/bottom) for more details of how `bottom` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `boxSizing`
+
+`boxSizing` defines how the element's various sizing props (`width`, `height`, `minWidth`, `minHeight`, etc.) are computed. If `boxSizing` is `border-box`, these sizes apply to the border box of the element. If it is `content-box`, they apply to the content box of the element. The default value is `border-box`. The [web documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing) is a good source of information if you wish to learn more about how this prop works.
+
+| Type | Required |
+| --------------------------------- | -------- |
+| enum('border-box', 'content-box') | No |
+
+---
+
+### `columnGap`
+
+`columnGap` works like `column-gap` in CSS. Only pixel units are supported in React Native.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `direction`
+
+`direction` specifies the directional flow of the user interface. The default is `inherit`, except for root node which will have value based on the current locale.
+
+See [MDN CSS Reference](https://www.yogalayout.dev/docs/styling/layout-direction) for more details.
+
+| Type | Required |
+| ----------------------------- | -------- |
+| enum('inherit', 'ltr', 'rtl') | No |
+
+---
+
+### `display`
+
+`display` sets the display type of this component.
+
+It works similarly to `display` in CSS but only supports the values 'flex', 'none', and 'contents'. The default is `flex`.
+
+| Type | Required |
+| -------------------------------- | -------- |
+| enum('none', 'flex', 'contents') | No |
+
+---
+
+### `end`
+
+When the direction is `ltr`, `end` is equivalent to `right`. When the direction is `rtl`, `end` is equivalent to `left`.
+
+This style takes precedence over the `left` and `right` styles.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `flex`
+
+In React Native `flex` does not work the same way that it does in CSS. `flex` is a number rather than a string, and it works according to the [Yoga](https://github.com/facebook/yoga) layout engine.
+
+When `flex` is a positive number, it makes the component flexible, and it will be sized proportional to its flex value. So a component with `flex` set to `2` will take twice the space as a component with `flex` set to 1. `flex: ` equates to `flexGrow: , flexShrink: 1, flexBasis: 0`.
+
+When `flex` is `0`, the component is sized according to `width` and `height`, and it is inflexible.
+
+When `flex` is `-1`, the component is normally sized according to `width` and `height`. However, if there's not enough space, the component will shrink to its `minWidth` and `minHeight`.
+
+`flexGrow`, `flexShrink`, and `flexBasis` work the same as in CSS.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `flexBasis`
+
+`flexBasis` is an axis-independent way of providing the default size of an item along the main axis. Setting the `flexBasis` of a child is similar to setting the `width` of that child if its parent is a container with `flexDirection: row` or setting the `height` of a child if its parent is a container with `flexDirection: column`. The `flexBasis` of an item is the default size of that item, the size of the item before any `flexGrow` and `flexShrink` calculations are performed.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `flexDirection`
+
+`flexDirection` controls which directions children of a container go. `row` goes left to right, `column` goes top to bottom, and you may be able to guess what the other two do. It works like `flex-direction` in CSS, except the default is `column`.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction) for more details.
+
+| Type | Required |
+| ------------------------------------------------------ | -------- |
+| enum('row', 'row-reverse', 'column', 'column-reverse') | No |
+
+---
+
+### `flexGrow`
+
+`flexGrow` describes how any space within a container should be distributed among its children along the main axis. After laying out its children, a container will distribute any remaining space according to the flex grow values specified by its children.
+
+`flexGrow` accepts any floating point value >= 0, with 0 being the default value. A container will distribute any remaining space among its children weighted by the children’s `flexGrow` values.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `flexShrink`
+
+[`flexShrink`](layout-props#flexshrink) describes how to shrink children along the main axis in the case in which the total size of the children overflows the size of the container on the main axis. `flexShrink` is very similar to `flexGrow` and can be thought of in the same way if any overflowing size is considered to be negative remaining space. These two properties also work well together by allowing children to grow and shrink as needed.
+
+`flexShrink` accepts any floating point value >= 0, with 0 being the default value. A container will shrink its children weighted by the children’s `flexShrink` values.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `flexWrap`
+
+`flexWrap` controls whether children can wrap around after they hit the end of a flex container. It works like `flex-wrap` in CSS (default: nowrap).
+
+Note it does not work anymore with `alignItems: stretch` (the default), so you may want to use `alignItems: flex-start` for example (breaking change details: https://github.com/facebook/react-native/releases/tag/v0.28.0).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap) for more details.
+
+| Type | Required |
+| -------------------------------------- | -------- |
+| enum('wrap', 'nowrap', 'wrap-reverse') | No |
+
+---
+
+### `gap`
+
+`gap` works like `gap` in CSS. Only pixel units are supported in React Native.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `height`
+
+`height` sets the height of this component.
+
+It works similarly to `height` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/height) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `inset`
+
+:::note
+`inset` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+Setting `inset` has the same effect as setting each of `top`, `bottom`, `right` and `left` props.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/inset) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `insetBlock`
+
+:::note
+`insetBlock` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+Equivalent to [`top`](layout-props#top) and [`bottom`](layout-props#bottom).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `insetBlockEnd`
+
+:::note
+`insetBlockEnd` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+Equivalent to [`bottom`](layout-props#bottom).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-end) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `insetBlockStart`
+
+:::note
+`insetBlockStart` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+Equivalent to [`top`](layout-props#top).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-start) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `insetInline`
+
+:::note
+`insetInline` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+Equivalent to [`right`](layout-props#right) and [`left`](layout-props#left).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `insetInlineEnd`
+
+:::note
+`insetInlineEnd` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+When direction is `ltr`, `insetInlineEnd` is equivalent to [`right`](layout-props#right). When direction is `rtl`, `insetInlineEnd` is equivalent to [`left`](layout-props#left).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-end) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `insetInlineStart`
+
+:::note
+`insetInlineStart` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+When direction is `ltr`, `insetInlineStart` is equivalent to [`left`](layout-props#left). When direction is `rtl`, `insetInlineStart` is equivalent to [`right`](layout-props#right).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `isolation`
+
+:::note
+`isolation` is only available on the [New Architecture](/architecture/landing-page)
+:::
+
+`isolation` lets you form a [stacking context](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_positioned_layout/Stacking_context).
+
+There are two values:
+
+- `auto` (default): Does nothing.
+- `isolate`: Forms a stacking context.
+
+| Type | Required |
+| ----------------------- | -------- |
+| enum('auto', 'isolate') | No |
+
+---
+
+### `justifyContent`
+
+`justifyContent` aligns children in the main direction. For example, if children are flowing vertically, `justifyContent` controls how they align vertically. It works like `justify-content` in CSS (default: flex-start).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) for more details.
+
+| Type | Required |
+| ----------------------------------------------------------------------------------------- | -------- |
+| enum('flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly') | No |
+
+---
+
+### `left`
+
+`left` is the number of logical pixels to offset the left edge of this component.
+
+It works similarly to `left` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/left) for more details of how `left` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `margin`
+
+Setting `margin` has the same effect as setting each of `marginTop`, `marginLeft`, `marginBottom`, and `marginRight`.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/margin) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginBottom`
+
+`marginBottom` works like `margin-bottom` in CSS. See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginBlock`
+
+Equivalent to [`marginVertical`](layout-props#marginvertical).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-block) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginBlockEnd`
+
+Equivalent to [`marginBottom`](layout-props#marginbottom).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-block-end) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginBlockStart`
+
+Equivalent to [`marginTop`](layout-props#margintop).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-block-start) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginEnd`
+
+When direction is `ltr`, `marginEnd` is equivalent to `marginRight`. When direction is `rtl`, `marginEnd` is equivalent to `marginLeft`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginHorizontal`
+
+Setting `marginHorizontal` has the same effect as setting both `marginLeft` and `marginRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginInline`
+
+Equivalent to [`marginHorizontal`](layout-props#marginhorizontal).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-inline) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginInlineEnd`
+
+When direction is `ltr`, `marginInlineEnd` is equivalent to [`marginEnd`](layout-props#marginend) (i.e. `marginRight`). When direction is `rtl`, `marginInlineEnd` is equivalent to [`marginEnd`](layout-props#marginend) (i.e. `marginLeft`).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-inline-end) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginInlineStart`
+
+When direction is `ltr`, `marginInlineStart` is equivalent to [`marginStart`](layout-props#marginstart) (i.e. `marginLeft`). When direction is `rtl`, `marginInlineStart` is equivalent to [`marginStart`](layout-props#marginstart) (i.e. `marginRight`).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-inline-start) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginLeft`
+
+`marginLeft` works like `margin-left` in CSS. See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginRight`
+
+`marginRight` works like `margin-right` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginStart`
+
+When direction is `ltr`, `marginStart` is equivalent to `marginLeft`. When direction is `rtl`, `marginStart` is equivalent to `marginRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginTop`
+
+`marginTop` works like `margin-top` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `marginVertical`
+
+Setting `marginVertical` has the same effect as setting both `marginTop` and `marginBottom`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `maxHeight`
+
+`maxHeight` is the maximum height for this component, in logical pixels.
+
+It works similarly to `max-height` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-height) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `maxWidth`
+
+`maxWidth` is the maximum width for this component, in logical pixels.
+
+It works similarly to `max-width` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `minHeight`
+
+`minHeight` is the minimum height for this component, in logical pixels.
+
+It works similarly to `min-height` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/min-height) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `minWidth`
+
+`minWidth` is the minimum width for this component, in logical pixels.
+
+It works similarly to `min-width` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/min-width) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `overflow`
+
+`overflow` controls how children are measured and displayed. `overflow: hidden` causes views to be clipped while `overflow: scroll` causes views to be measured independently of their parents' main axis. It works like `overflow` in CSS (default: visible).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow) for more details.
+
+| Type | Required |
+| ----------------------------------- | -------- |
+| enum('visible', 'hidden', 'scroll') | No |
+
+---
+
+### `padding`
+
+Setting `padding` has the same effect as setting each of `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingBottom`
+
+`paddingBottom` works like `padding-bottom` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingBlock`
+
+Equivalent to [`paddingVertical`](layout-props#paddingvertical).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/padding-block) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingBlockEnd`
+
+Equivalent to [`paddingBottom`](layout-props#paddingbottom).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/padding-block-end) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingBlockStart`
+
+Equivalent to [`paddingTop`](layout-props#paddingtop).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/padding-block-start) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingEnd`
+
+When direction is `ltr`, `paddingEnd` is equivalent to `paddingRight`. When direction is `rtl`, `paddingEnd` is equivalent to `paddingLeft`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingHorizontal`
+
+Setting `paddingHorizontal` is like setting both of `paddingLeft` and `paddingRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingInline`
+
+Equivalent to [`paddingHorizontal`](layout-props#paddinghorizontal).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/padding-inline) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingInlineEnd`
+
+When direction is `ltr`, `paddingInlineEnd` is equivalent to [`paddingEnd`](layout-props#paddingend) (i.e. `paddingRight`). When direction is `rtl`, `paddingInlineEnd` is equivalent to [`paddingEnd`](layout-props#paddingend) (i.e. `paddingLeft`).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/padding-inline-end) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingInlineStart`
+
+When direction is `ltr`, `paddingInlineStart` is equivalent to [`paddingStart`](layout-props#paddingstart) (i.e. `paddingLeft`). When direction is `rtl`, `paddingInlineStart` is equivalent to [`paddingStart`](layout-props#paddingstart) (i.e. `paddingRight`).
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/padding-inline-start) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingLeft`
+
+`paddingLeft` works like `padding-left` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingRight`
+
+`paddingRight` works like `padding-right` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingStart`
+
+When direction is `ltr`, `paddingStart` is equivalent to `paddingLeft`. When direction is `rtl`, `paddingStart` is equivalent to `paddingRight`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingTop`
+
+`paddingTop` works like `padding-top` in CSS.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `paddingVertical`
+
+Setting `paddingVertical` is like setting both of `paddingTop` and `paddingBottom`.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `position`
+
+`position` in React Native is similar to [regular CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/position), but everything is set to `relative` by default.
+
+`relative` will position an element according to the normal flow of the layout. Insets (`top`, `bottom`, `left`, `right`) will offset relative to this layout.
+
+`absolute` takes the element out of the normal flow of the layout. Insets will offset relative to its [containing block](./flexbox.md#the-containing-block).
+
+`static` will position an element according to the normal flow of the layout. Insets will have no effect.
+`static` elements do not form a containing block for absolute descendants.
+
+For more information, see the [Layout with Flexbox docs](./flexbox.md#position). Also, [the Yoga documentation](https://www.yogalayout.dev/docs/styling/position) has more details on how `position` differs between React Native and CSS.
+
+| Type | Required |
+| -------------------------------------- | -------- |
+| enum('absolute', 'relative', 'static') | No |
+
+---
+
+### `right`
+
+`right` is the number of logical pixels to offset the right edge of this component.
+
+It works similarly to `right` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/right) for more details of how `right` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `rowGap`
+
+`rowGap` works like `row-gap` in CSS. Only pixel units are supported in React Native.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `start`
+
+When the direction is `ltr`, `start` is equivalent to `left`. When the direction is `rtl`, `start` is equivalent to `right`.
+
+This style takes precedence over the `left`, `right`, and `end` styles.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `top`
+
+`top` is the number of logical pixels to offset the top edge of this component.
+
+It works similarly to `top` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/top) for more details of how `top` affects layout.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `width`
+
+`width` sets the width of this component.
+
+It works similarly to `width` in CSS, but in React Native you must use points or percentages. Ems and other units are not supported.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/width) for more details.
+
+| Type | Required |
+| -------------- | -------- |
+| number, string | No |
+
+---
+
+### `zIndex`
+
+`zIndex` controls which components display on top of others. Normally, you don't use `zIndex`. Components render according to their order in the document tree, so later components draw over earlier ones. `zIndex` may be useful if you have animations or custom modal interfaces where you don't want this behavior.
+
+It works like the CSS `z-index` property - components with a larger `zIndex` will render on top. Think of the z-direction like it's pointing from the phone into your eyeball.
+
+On iOS, `zIndex` may require `View`s to be siblings of each other for it to work as expected.
+
+See [MDN CSS Reference](https://developer.mozilla.org/en-US/docs/Web/CSS/z-index) for more details.
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
diff --git a/website/versioned_docs/version-0.86/layoutanimation.md b/website/versioned_docs/version-0.86/layoutanimation.md
new file mode 100644
index 00000000000..911a247c8c7
--- /dev/null
+++ b/website/versioned_docs/version-0.86/layoutanimation.md
@@ -0,0 +1,358 @@
+---
+id: layoutanimation
+title: LayoutAnimation
+---
+
+Automatically animates views to their new positions when the next layout happens.
+
+A common way to use this API is to call it before updating the state hook in functional components and calling `setState` in class components.
+
+Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
+
+```js
+if (Platform.OS === 'android') {
+ if (UIManager.setLayoutAnimationEnabledExperimental) {
+ UIManager.setLayoutAnimationEnabledExperimental(true);
+ }
+}
+```
+
+## Example
+
+```SnackPlayer name=LayoutAnimation%20Example&supportedPlatforms=android,ios
+import React, {useState} from 'react';
+import {
+ LayoutAnimation,
+ Platform,
+ StyleSheet,
+ Text,
+ TouchableOpacity,
+ UIManager,
+ View,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+if (
+ Platform.OS === 'android' &&
+ UIManager.setLayoutAnimationEnabledExperimental
+) {
+ UIManager.setLayoutAnimationEnabledExperimental(true);
+}
+const App = () => {
+ const [expanded, setExpanded] = useState(false);
+
+ return (
+
+
+ {
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
+ setExpanded(!expanded);
+ }}>
+ Press me to {expanded ? 'collapse' : 'expand'}!
+
+ {expanded && (
+
+ I disappear sometimes!
+
+ )}
+
+
+ );
+};
+
+const style = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ gap: 16,
+ },
+ tile: {
+ backgroundColor: 'lightgrey',
+ borderWidth: 0.5,
+ borderColor: '#d6d7da',
+ padding: 4,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `configureNext()`
+
+```tsx
+static configureNext(
+ config: LayoutAnimationConfig,
+ onAnimationDidEnd?: () => void,
+ onAnimationDidFail?: () => void,
+);
+```
+
+Schedules an animation to happen on the next layout.
+
+#### Parameters:
+
+| Name | Type | Required | Description |
+| ------------------ | -------- | -------- | ----------------------------------- |
+| config | object | Yes | See config description below. |
+| onAnimationDidEnd | function | No | Called when the animation finished. |
+| onAnimationDidFail | function | No | Called when the animation failed. |
+
+The `config` parameter is an object with the keys below. [`create`](layoutanimation.md#create) returns a valid object for `config`, and the [`Presets`](layoutanimation.md#presets) objects can also all be passed as the `config`.
+
+- `duration` in milliseconds
+- `create`, optional config for animating in new views
+- `update`, optional config for animating views that have been updated
+- `delete`, optional config for animating views as they are removed
+
+The config that's passed to `create`, `update`, or `delete` has the following keys:
+
+- `type`, the [animation type](layoutanimation.md#types) to use
+- `property`, the [layout property](layoutanimation.md#properties) to animate (optional, but recommended for `create` and `delete`)
+- `springDamping` (number, optional and only for use with `type: Type.spring`)
+- `initialVelocity` (number, optional)
+- `delay` (number, optional)
+- `duration` (number, optional)
+
+---
+
+### `create()`
+
+```tsx
+static create(duration, type, creationProp)
+```
+
+Helper that creates an object (with `create`, `update`, and `delete` fields) to pass into [`configureNext`](layoutanimation.md#configurenext). The `type` parameter is an [animation type](layoutanimation.md#types), and the `creationProp` parameter is a [layout property](layoutanimation.md#properties).
+
+**Example:**
+
+```SnackPlayer name=LayoutAnimation&supportedPlatforms=android,ios
+import React, {useState} from 'react';
+import {
+ View,
+ Platform,
+ UIManager,
+ LayoutAnimation,
+ StyleSheet,
+ Button,
+} from 'react-native';
+
+if (
+ Platform.OS === 'android' &&
+ UIManager.setLayoutAnimationEnabledExperimental
+) {
+ UIManager.setLayoutAnimationEnabledExperimental(true);
+}
+
+const App = () => {
+ const [boxPosition, setBoxPosition] = useState('left');
+
+ const toggleBox = () => {
+ LayoutAnimation.configureNext({
+ duration: 500,
+ create: {type: 'linear', property: 'opacity'},
+ update: {type: 'spring', springDamping: 0.4},
+ delete: {type: 'linear', property: 'opacity'},
+ });
+ setBoxPosition(boxPosition === 'left' ? 'right' : 'left');
+ };
+
+ return (
+
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'flex-start',
+ justifyContent: 'center',
+ },
+ box: {
+ height: 100,
+ width: 100,
+ borderRadius: 5,
+ margin: 8,
+ backgroundColor: 'blue',
+ },
+ moveRight: {
+ alignSelf: 'flex-end',
+ height: 200,
+ width: 200,
+ },
+ buttonContainer: {
+ alignSelf: 'center',
+ },
+});
+
+export default App;
+```
+
+## Properties
+
+### Types
+
+An enumeration of animation types to be used in the [`create`](layoutanimation.md#create) method, or in the `create`/`update`/`delete` configs for [`configureNext`](layoutanimation.md#configurenext). (example usage: `LayoutAnimation.Types.easeIn`)
+
+| Types |
+| ------------- |
+| spring |
+| linear |
+| easeInEaseOut |
+| easeIn |
+| easeOut |
+| keyboard |
+
+---
+
+### Properties
+
+An enumeration of layout properties to be animated to be used in the [`create`](layoutanimation.md#create) method, or in the `create`/`update`/`delete` configs for [`configureNext`](layoutanimation.md#configurenext). (example usage: `LayoutAnimation.Properties.opacity`)
+
+| Properties |
+| ---------- |
+| opacity |
+| scaleX |
+| scaleY |
+| scaleXY |
+
+---
+
+### Presets
+
+A set of predefined animation configs to pass into [`configureNext`](layoutanimation.md#configurenext).
+
+| Presets | Value |
+| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| easeInEaseOut | `create(300, 'easeInEaseOut', 'opacity')` |
+| linear | `create(500, 'linear', 'opacity')` |
+| spring | `{duration: 700, create: {type: 'linear', property: 'opacity'}, update: {type: 'spring', springDamping: 0.4}, delete: {type: 'linear', property: 'opacity'} }` |
+
+---
+
+### `easeInEaseOut`
+
+Calls `configureNext()` with `Presets.easeInEaseOut`.
+
+---
+
+### `linear`
+
+Calls `configureNext()` with `Presets.linear`.
+
+---
+
+### `spring`
+
+Calls `configureNext()` with `Presets.spring`.
+
+**Example:**
+
+```SnackPlayer name=LayoutAnimation&supportedPlatforms=android,ios
+import React, {useState} from 'react';
+import {
+ View,
+ Platform,
+ UIManager,
+ LayoutAnimation,
+ StyleSheet,
+ Button,
+} from 'react-native';
+
+if (
+ Platform.OS === 'android' &&
+ UIManager.setLayoutAnimationEnabledExperimental
+) {
+ UIManager.setLayoutAnimationEnabledExperimental(true);
+}
+
+const App = () => {
+ const [firstBoxPosition, setFirstBoxPosition] = useState('left');
+ const [secondBoxPosition, setSecondBoxPosition] = useState('left');
+ const [thirdBoxPosition, setThirdBoxPosition] = useState('left');
+
+ const toggleFirstBox = () => {
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
+ setFirstBoxPosition(firstBoxPosition === 'left' ? 'right' : 'left');
+ };
+
+ const toggleSecondBox = () => {
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.linear);
+ setSecondBoxPosition(secondBoxPosition === 'left' ? 'right' : 'left');
+ };
+
+ const toggleThirdBox = () => {
+ LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
+ setThirdBoxPosition(thirdBoxPosition === 'left' ? 'right' : 'left');
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'flex-start',
+ justifyContent: 'center',
+ },
+ box: {
+ height: 100,
+ width: 100,
+ borderRadius: 5,
+ margin: 8,
+ backgroundColor: 'blue',
+ },
+ moveRight: {
+ alignSelf: 'flex-end',
+ },
+ buttonContainer: {
+ alignSelf: 'center',
+ },
+});
+
+export default App;
+```
diff --git a/website/versioned_docs/version-0.86/layoutevent.md b/website/versioned_docs/version-0.86/layoutevent.md
new file mode 100644
index 00000000000..1c4464bbef1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/layoutevent.md
@@ -0,0 +1,72 @@
+---
+id: layoutevent
+title: LayoutEvent Object Type
+---
+
+`LayoutEvent` object is returned in the callback as a result of component layout change, for example `onLayout` in [View](view) component.
+
+## Example
+
+```js
+{
+ layout: {
+ width: 520,
+ height: 70.5,
+ x: 0,
+ y: 42.5
+ },
+ target: 1127
+}
+```
+
+## Keys and values
+
+### `height`
+
+Height of the component after the layout changes.
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `width`
+
+Width of the component after the layout changes.
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `x`
+
+Component X coordinate inside the parent component.
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `y`
+
+Component Y coordinate inside the parent component.
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `target`
+
+The node id of the element receiving the LayoutEvent.
+
+| Type | Optional |
+| --------------------------- | -------- |
+| number, `null`, `undefined` | No |
+
+## Used by
+
+- [`Image`](image)
+- [`Pressable`](pressable)
+- [`ScrollView`](scrollview)
+- [`Text`](text)
+- [`TextInput`](textinput)
+- [`TouchableWithoutFeedback`](touchablewithoutfeedback)
+- [`View`](view)
diff --git a/website/versioned_docs/version-0.86/legacy/direct-manipulation.md b/website/versioned_docs/version-0.86/legacy/direct-manipulation.md
new file mode 100644
index 00000000000..b3e7e063414
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/direct-manipulation.md
@@ -0,0 +1,444 @@
+---
+id: direct-manipulation
+title: Direct Manipulation
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+It is sometimes necessary to make changes directly to a component without using state/props to trigger a re-render of the entire subtree. When using React in the browser for example, you sometimes need to directly modify a DOM node, and the same is true for views in mobile apps. `setNativeProps` is the React Native equivalent to setting properties directly on a DOM node.
+
+:::caution
+Use `setNativeProps` when frequent re-rendering creates a performance bottleneck!
+
+Direct manipulation will not be a tool that you reach for frequently. You will typically only be using it for creating continuous animations to avoid the overhead of rendering the component hierarchy and reconciling many views.
+`setNativeProps` is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your code more difficult to reason about.
+
+Before you use it, try to solve your problem with `setState` and [`shouldComponentUpdate`](https://react.dev/reference/react/Component#shouldcomponentupdate).
+:::
+
+## setNativeProps with TouchableOpacity
+
+[TouchableOpacity](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js) uses `setNativeProps` internally to update the opacity of its child component:
+
+```tsx
+const viewRef = useRef();
+const setOpacityTo = useCallback(value => {
+ // Redacted: animation related code
+ viewRef.current.setNativeProps({
+ opacity: value,
+ });
+}, []);
+```
+
+This allows us to write the following code and know that the child will have its opacity updated in response to taps, without the child having any knowledge of that fact or requiring any changes to its implementation:
+
+```tsx
+
+
+ Press me!
+
+
+```
+
+Let's imagine that `setNativeProps` was not available. One way that we might implement it with that constraint is to store the opacity value in the state, then update that value whenever `onPress` is fired:
+
+```tsx
+const [buttonOpacity, setButtonOpacity] = useState(1);
+return (
+ setButtonOpacity(0.5)}
+ onPressOut={() => setButtonOpacity(1)}>
+
+ Press me!
+
+
+);
+```
+
+This is computationally intensive compared to the original example - React needs to re-render the component hierarchy each time the opacity changes, even though other properties of the view and its children haven't changed. Usually this overhead isn't a concern but when performing continuous animations and responding to gestures, judiciously optimizing your components can improve your animations' fidelity.
+
+If you look at the implementation of `setNativeProps` in [NativeMethodsMixin](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js) you will notice that it is a wrapper around `RCTUIManager.updateView` - this is the exact same function call that results from re-rendering - see [receiveComponent in ReactNativeBaseComponent](https://github.com/facebook/react-native/blob/fb2ec1ea47c53c2e7b873acb1cb46192ac74274e/Libraries/Renderer/oss/ReactNativeRenderer-prod.js#L5793-L5813).
+
+## Composite components and setNativeProps
+
+Composite components are not backed by a native view, so you cannot call `setNativeProps` on them. Consider this example:
+
+
+
+
+```SnackPlayer name=setNativeProps%20with%20Composite%20Components&ext=js
+import React from 'react';
+import {Text, TouchableOpacity, View} from 'react-native';
+
+const MyButton = props => (
+
+ {props.label}
+
+);
+
+const App = () => (
+
+
+
+);
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=setNativeProps%20with%20Composite%20Components&ext=tsx
+import React from 'react';
+import {Text, TouchableOpacity, View} from 'react-native';
+
+const MyButton = (props: {label: string}) => (
+
+ {props.label}
+
+);
+
+const App = () => (
+
+
+
+);
+
+export default App;
+```
+
+
+
+
+If you run this you will immediately see this error: `Touchable child must either be native or forward setNativeProps to a native component`. This occurs because `MyButton` isn't directly backed by a native view whose opacity should be set. You can think about it like this: if you define a component with `createReactClass` you would not expect to be able to set a style prop on it and have that work - you would need to pass the style prop down to a child, unless you are wrapping a native component. Similarly, we are going to forward `setNativeProps` to a native-backed child component.
+
+#### Forward setNativeProps to a child
+
+Since the `setNativeProps` method exists on any ref to a `View` component, it is enough to forward a ref on your custom component to one of the `` components that it renders. This means that a call to `setNativeProps` on the custom component will have the same effect as if you called `setNativeProps` on the wrapped `View` component itself.
+
+
+
+
+```SnackPlayer name=Forwarding%20setNativeProps&ext=js
+import React from 'react';
+import {Text, TouchableOpacity, View} from 'react-native';
+
+const MyButton = React.forwardRef((props, ref) => (
+
+ {props.label}
+
+));
+
+const App = () => (
+
+
+
+);
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Forwarding%20setNativeProps&ext=tsx
+import React from 'react';
+import {Text, TouchableOpacity, View} from 'react-native';
+
+const MyButton = React.forwardRef((props, ref) => (
+
+ {props.label}
+
+));
+
+const App = () => (
+
+
+
+);
+
+export default App;
+```
+
+
+
+
+You can now use `MyButton` inside of `TouchableOpacity`!
+
+You may have noticed that we passed all of the props down to the child view using `{...props}`. The reason for this is that `TouchableOpacity` is actually a composite component, and so in addition to depending on `setNativeProps` on its child, it also requires that the child perform touch handling. To do this, it passes on [various props](view.md#onmoveshouldsetresponder) that call back to the `TouchableOpacity` component. `TouchableHighlight`, in contrast, is backed by a native view and only requires that we implement `setNativeProps`.
+
+## setNativeProps to edit TextInput value
+
+Another very common use case of `setNativeProps` is to edit the value of the TextInput. The `controlled` prop of TextInput can sometimes drop characters when the `bufferDelay` is low and the user types very quickly. Some developers prefer to skip this prop entirely and instead use `setNativeProps` to directly manipulate the TextInput value when necessary. For example, the following code demonstrates editing the input when you tap a button:
+
+
+
+
+```SnackPlayer name=Clear%20text&ext=js
+import React from 'react';
+import {useCallback, useRef} from 'react';
+import {
+ StyleSheet,
+ TextInput,
+ Text,
+ TouchableOpacity,
+ View,
+} from 'react-native';
+
+const App = () => {
+ const inputRef = useRef(null);
+ const editText = useCallback(() => {
+ inputRef.current.setNativeProps({text: 'Edited Text'});
+ }, []);
+
+ return (
+
+
+
+ Edit text
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ input: {
+ height: 50,
+ width: 200,
+ marginHorizontal: 20,
+ borderWidth: 1,
+ borderColor: '#ccc',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Clear%20text&ext=tsx
+import React from 'react';
+import {useCallback, useRef} from 'react';
+import {
+ StyleSheet,
+ TextInput,
+ Text,
+ TouchableOpacity,
+ View,
+} from 'react-native';
+
+const App = () => {
+ const inputRef = useRef(null);
+ const editText = useCallback(() => {
+ inputRef.current?.setNativeProps({text: 'Edited Text'});
+ }, []);
+
+ return (
+
+
+
+ Edit text
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ input: {
+ height: 50,
+ width: 200,
+ marginHorizontal: 20,
+ borderWidth: 1,
+ borderColor: '#ccc',
+ },
+});
+
+export default App;
+```
+
+
+
+
+You can use the [`clear`](../textinput#clear) method to clear the `TextInput` which clears the current input text using the same approach.
+
+## Avoiding conflicts with the render function
+
+If you update a property that is also managed by the render function, you might end up with some unpredictable and confusing bugs because anytime the component re-renders and that property changes, whatever value was previously set from `setNativeProps` will be completely ignored and overridden.
+
+## setNativeProps & shouldComponentUpdate
+
+By [intelligently applying `shouldComponentUpdate`](https://react.dev/reference/react/Component#shouldcomponentupdate) you can avoid the unnecessary overhead involved in reconciling unchanged component subtrees, to the point where it may be performant enough to use `setState` instead of `setNativeProps`.
+
+## Other native methods
+
+The methods described here are available on most of the default components provided by React Native. Note, however, that they are _not_ available on composite components that aren't directly backed by a native view. This will generally include most components that you define in your own app.
+
+### measure(callback)
+
+Determines the location on screen, width, and height in the viewport of the given view and returns the values via an async callback. If successful, the callback will be called with the following arguments:
+
+- x
+- y
+- width
+- height
+- pageX
+- pageY
+
+Note that these measurements are not available until after the rendering has been completed in native. If you need the measurements as soon as possible and you don't need `pageX` and `pageY`, consider using the [`onLayout`](view.md#onlayout) property instead.
+
+Also the width and height returned by `measure()` are the width and height of the component in the viewport. If you need the actual size of the component, consider using the [`onLayout`](view.md#onlayout) property instead.
+
+### measureInWindow(callback)
+
+Determines the location of the given view in the window and returns the values via an async callback. If the React root view is embedded in another native view, this will give you the absolute coordinates. If successful, the callback will be called with the following arguments:
+
+- x
+- y
+- width
+- height
+
+### measureLayout(relativeToNativeComponentRef, onSuccess, onFail)
+
+Like `measure()`, but measures the view relative to an ancestor, specified with `relativeToNativeComponentRef` reference. This means that the returned coordinates are relative to the origin `x`, `y` of the ancestor view.
+
+:::note
+This method can also be called with a `relativeToNativeNode` handler (instead of reference), but this variant is obsolete with the new architecture.
+:::
+
+
+
+
+```SnackPlayer name=measureLayout%20example&supportedPlatforms=android,ios&ext=js
+import React, {useEffect, useRef, useState} from 'react';
+import {Text, View, StyleSheet} from 'react-native';
+
+const App = () => {
+ const textContainerRef = useRef(null);
+ const textRef = useRef(null);
+ const [measure, setMeasure] = useState(null);
+
+ useEffect(() => {
+ if (textRef.current && textContainerRef.current) {
+ textRef.current.measureLayout(
+ textContainerRef.current,
+ (left, top, width, height) => {
+ setMeasure({left, top, width, height});
+ },
+ );
+ }
+ }, [measure]);
+
+ return (
+
+
+ Where am I? (relative to the text container)
+
+ {JSON.stringify(measure)}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ textContainer: {
+ backgroundColor: '#61dafb',
+ justifyContent: 'center',
+ alignItems: 'center',
+ padding: 12,
+ },
+ measure: {
+ textAlign: 'center',
+ padding: 12,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=measureLayout%20example&ext=tsx
+import React, {useEffect, useRef, useState} from 'react';
+import {Text, View, StyleSheet} from 'react-native';
+
+type Measurements = {
+ left: number;
+ top: number;
+ width: number;
+ height: number;
+};
+
+const App = () => {
+ const textContainerRef = useRef(null);
+ const textRef = useRef(null);
+ const [measure, setMeasure] = useState(null);
+
+ useEffect(() => {
+ if (textRef.current && textContainerRef.current) {
+ textRef.current?.measureLayout(
+ textContainerRef.current,
+ (left, top, width, height) => {
+ setMeasure({left, top, width, height});
+ },
+ () => {
+ console.error('measurement failed');
+ },
+ );
+ }
+ }, [measure]);
+
+ return (
+
+
+ Where am I? (relative to the text container)
+
+ {JSON.stringify(measure)}
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ textContainer: {
+ backgroundColor: '#61dafb',
+ justifyContent: 'center',
+ alignItems: 'center',
+ padding: 12,
+ },
+ measure: {
+ textAlign: 'center',
+ padding: 12,
+ },
+});
+
+export default App;
+```
+
+
+
+
+### focus()
+
+Requests focus for the given input or view. The exact behavior triggered will depend on the platform and type of view.
+
+### blur()
+
+Removes focus from an input or view. This is the opposite of `focus()`.
diff --git a/website/versioned_docs/version-0.86/legacy/local-library-setup.md b/website/versioned_docs/version-0.86/legacy/local-library-setup.md
new file mode 100644
index 00000000000..fff5daefaed
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/local-library-setup.md
@@ -0,0 +1,94 @@
+---
+id: local-library-setup
+title: Local libraries setup
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+A local library is a library containing views or modules that's local to your app and not published to a registry. This is different from the traditional setup for view and modules in the sense that a local library is decoupled from your app's native code.
+
+The local library is created outside of the `android/` and `ios/` folders and makes use of autolinking to integrate with your app. The structure with a local library may look like this:
+
+```plaintext
+MyApp
+├── node_modules
+├── modules <-- folder for your local libraries
+│ └── awesome-module <-- your local library
+├── android
+├── ios
+├── src
+├── index.js
+└── package.json
+```
+
+Since a local library's code exists outside of `android/` and `ios/` folders, it makes it easier to upgrade React Native versions in the future, copy to other projects etc.
+
+To create local library we will use [create-react-native-library](https://callstack.github.io/react-native-builder-bob/create). This tool contains all the necessary templates.
+
+### Getting Started
+
+Inside your React Native application's root folder, run the following command:
+
+```shell
+npx create-react-native-library@latest awesome-module
+```
+
+Where `awesome-module` is the name you would like for the new module. After going through the prompts, you will have a new folder called `modules` in your project's root directory which contains the new module.
+
+### Linking
+
+By default, the generated library is automatically linked to the project using `link:` protocol when using Yarn and `file:` when using npm:
+
+
+
+
+
+```json
+"dependencies": {
+ "awesome-module": "file:./modules/awesome-module"
+}
+```
+
+
+
+
+```json
+"dependencies": {
+ "awesome-module": "link:./modules/awesome-module"
+}
+```
+
+
+
+
+This creates a symlink to the library under `node_modules` which makes autolinking work.
+
+### Installing dependencies
+
+To link the module you need to install dependencies:
+
+
+
+
+
+```shell
+npm install
+```
+
+
+
+
+```shell
+yarn install
+```
+
+
+
+
+### Using module inside your app
+
+To use the module inside your app, you can import it by its name:
+
+```js
+import {multiply} from 'awesome-module';
+```
diff --git a/website/versioned_docs/version-0.86/legacy/native-components-android.md b/website/versioned_docs/version-0.86/legacy/native-components-android.md
new file mode 100644
index 00000000000..9443d854c53
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/native-components-android.md
@@ -0,0 +1,873 @@
+---
+id: native-components-android
+title: Android Native UI Components
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+import NativeDeprecated from '../the-new-architecture/\_markdown_native_deprecation.mdx'
+
+
+
+There are tons of native UI widgets out there ready to be used in the latest apps - some of them are part of the platform, others are available as third-party libraries, and still more might be in use in your very own portfolio. React Native has several of the most critical platform components already wrapped, like `ScrollView` and `TextInput`, but not all of them, and certainly not ones you might have written yourself for a previous app. Fortunately, we can wrap up these existing components for seamless integration with your React Native application.
+
+Like the native module guide, this too is a more advanced guide that assumes you are somewhat familiar with Android SDK programming. This guide will show you how to build a native UI component, walking you through the implementation of a subset of the existing `ImageView` component available in the core React Native library.
+
+:::info
+You can also setup local library containing native component with one command. Read the guide to [Local libraries setup](local-library-setup) for more details.
+:::
+
+## ImageView example
+
+For this example we are going to walk through the implementation requirements to allow the use of ImageViews in JavaScript.
+
+Native views are created and manipulated by extending `ViewManager` or more commonly `SimpleViewManager` . A `SimpleViewManager` is convenient in this case because it applies common properties such as background color, opacity, and Flexbox layout.
+
+These subclasses are essentially singletons - only one instance of each is created by the bridge. They send native views to the `NativeViewHierarchyManager`, which delegates back to them to set and update the properties of the views as necessary. The `ViewManagers` are also typically the delegates for the views, sending events back to JavaScript via the bridge.
+
+To send a view:
+
+1. Create the ViewManager subclass.
+2. Implement the `createViewInstance` method
+3. Expose view property setters using `@ReactProp` (or `@ReactPropGroup`) annotation
+4. Register the manager in `createViewManagers` of the applications package.
+5. Implement the JavaScript module
+
+### 1. Create the `ViewManager` subclass
+
+In this example we create view manager class `ReactImageManager` that extends `SimpleViewManager` of type `ReactImageView`. `ReactImageView` is the type of object managed by the manager, this will be the custom native view. Name returned by `getName` is used to reference the native view type from JavaScript.
+
+
+
+
+```kotlin
+class ReactImageManager(
+ private val callerContext: ReactApplicationContext
+) : SimpleViewManager() {
+
+ override fun getName() = REACT_CLASS
+
+ companion object {
+ const val REACT_CLASS = "RCTImageView"
+ }
+}
+```
+
+
+
+
+```java
+public class ReactImageManager extends SimpleViewManager {
+
+ public static final String REACT_CLASS = "RCTImageView";
+ ReactApplicationContext mCallerContext;
+
+ public ReactImageManager(ReactApplicationContext reactContext) {
+ mCallerContext = reactContext;
+ }
+
+ @Override
+ public String getName() {
+ return REACT_CLASS;
+ }
+}
+```
+
+
+
+
+### 2. Implement method `createViewInstance`
+
+Views are created in the `createViewInstance` method, the view should initialize itself in its default state, any properties will be set via a follow up call to `updateView.`
+
+
+
+
+```kotlin
+ override fun createViewInstance(context: ThemedReactContext) =
+ ReactImageView(context, Fresco.newDraweeControllerBuilder(), null, callerContext)
+```
+
+
+
+
+```java
+ @Override
+ public ReactImageView createViewInstance(ThemedReactContext context) {
+ return new ReactImageView(context, Fresco.newDraweeControllerBuilder(), null, mCallerContext);
+ }
+```
+
+
+
+
+### 3. Expose view property setters using `@ReactProp` (or `@ReactPropGroup`) annotation
+
+Properties that are to be reflected in JavaScript needs to be exposed as setter method annotated with `@ReactProp` (or `@ReactPropGroup`). Setter method should take view to be updated (of the current view type) as a first argument and property value as a second argument. Setter should be public and not return a value (i.e. return type should be `void` in Java or `Unit` in Kotlin). Property type sent to JS is determined automatically based on the type of value argument of the setter. The following type of values are currently supported (in Java): `boolean`, `int`, `float`, `double`, `String`, `Boolean`, `Integer`, `ReadableArray`, `ReadableMap`. The corresponding types in Kotlin are `Boolean`, `Int`, `Float`, `Double`, `String`, `ReadableArray`, `ReadableMap`.
+
+Annotation `@ReactProp` has one obligatory argument `name` of type `String`. Name assigned to the `@ReactProp` annotation linked to the setter method is used to reference the property on JS side.
+
+Except from `name`, `@ReactProp` annotation may take following optional arguments: `defaultBoolean`, `defaultInt`, `defaultFloat`. Those arguments should be of the corresponding type (accordingly `boolean`, `int`, `float` in Java and `Boolean`, `Int`, `Float` in Kotlin) and the value provided will be passed to the setter method in case when the property that the setter is referencing has been removed from the component. Note that "default" values are only provided for primitive types, in case when setter is of some complex type, `null` will be provided as a default value in case when corresponding property gets removed.
+
+Setter declaration requirements for methods annotated with `@ReactPropGroup` are different than for `@ReactProp`, please refer to the `@ReactPropGroup` annotation class docs for more information about it. **IMPORTANT!** in ReactJS updating the property value will result in setter method call. Note that one of the ways we can update component is by removing properties that have been set before. In that case setter method will be called as well to notify view manager that property has changed. In that case "default" value will be provided (for primitive types "default" value can be specified using `defaultBoolean`, `defaultFloat`, etc. arguments of `@ReactProp` annotation, for complex types setter will be called with value set to `null`).
+
+
+
+
+```kotlin
+ @ReactProp(name = "src")
+ fun setSrc(view: ReactImageView, sources: ReadableArray?) {
+ view.setSource(sources)
+ }
+
+ @ReactProp(name = "borderRadius", defaultFloat = 0f)
+ override fun setBorderRadius(view: ReactImageView, borderRadius: Float) {
+ view.setBorderRadius(borderRadius)
+ }
+
+ @ReactProp(name = ViewProps.RESIZE_MODE)
+ fun setResizeMode(view: ReactImageView, resizeMode: String?) {
+ view.setScaleType(ImageResizeMode.toScaleType(resizeMode))
+ }
+```
+
+
+
+
+```java
+ @ReactProp(name = "src")
+ public void setSrc(ReactImageView view, @Nullable ReadableArray sources) {
+ view.setSource(sources);
+ }
+
+ @ReactProp(name = "borderRadius", defaultFloat = 0f)
+ public void setBorderRadius(ReactImageView view, float borderRadius) {
+ view.setBorderRadius(borderRadius);
+ }
+
+ @ReactProp(name = ViewProps.RESIZE_MODE)
+ public void setResizeMode(ReactImageView view, @Nullable String resizeMode) {
+ view.setScaleType(ImageResizeMode.toScaleType(resizeMode));
+ }
+```
+
+
+
+
+### 4. Register the `ViewManager`
+
+The final step is to register the ViewManager to the application, this happens in a similar way to [Native Modules](native-modules-android.md), via the applications package member function `createViewManagers`.
+
+
+
+
+```kotlin
+ override fun createViewManagers(
+ reactContext: ReactApplicationContext
+ ) = listOf(ReactImageManager(reactContext))
+```
+
+
+
+
+```java
+ @Override
+ public List createViewManagers(
+ ReactApplicationContext reactContext) {
+ return Arrays.asList(
+ new ReactImageManager(reactContext)
+ );
+ }
+```
+
+
+
+
+### 5. Implement the JavaScript module
+
+The very final step is to create the JavaScript module that defines the interface layer between Java/Kotlin and JavaScript for the users of your new view. It is recommended for you to document the component interface in this module (e.g. using TypeScript, Flow, or plain old comments).
+
+```tsx title="ImageView.tsx"
+import {requireNativeComponent} from 'react-native';
+
+/**
+ * Composes `View`.
+ *
+ * - src: Array<{url: string}>
+ * - borderRadius: number
+ * - resizeMode: 'cover' | 'contain' | 'stretch'
+ */
+export default requireNativeComponent('RCTImageView');
+```
+
+The `requireNativeComponent` function takes the name of the native view. Note that if your component needs to do anything more sophisticated (e.g. custom event handling), you should wrap the native component in another React component. This is illustrated in the `MyCustomView` example below.
+
+## Events
+
+So now we know how to expose native view components that we can control freely from JS, but how do we deal with events from the user, like pinch-zooms or panning? When a native event occurs the native code should issue an event to the JavaScript representation of the View, and the two views are linked with the value returned from the `getId()` method.
+
+
+
+
+```kotlin
+class MyCustomView(context: Context) : View(context) {
+ ...
+ fun onReceiveNativeEvent() {
+ val event = Arguments.createMap().apply {
+ putString("message", "MyMessage")
+ }
+ val reactContext = context as ReactContext
+ reactContext
+ .getJSModule(RCTEventEmitter::class.java)
+ .receiveEvent(id, "topChange", event)
+ }
+}
+```
+
+
+
+
+```java
+class MyCustomView extends View {
+ ...
+ public void onReceiveNativeEvent() {
+ WritableMap event = Arguments.createMap();
+ event.putString("message", "MyMessage");
+ ReactContext reactContext = (ReactContext)getContext();
+ reactContext
+ .getJSModule(RCTEventEmitter.class)
+ .receiveEvent(getId(), "topChange", event);
+ }
+}
+```
+
+
+
+
+To map the `topChange` event name to the `onChange` callback prop in JavaScript, register it by overriding the `getExportedCustomBubblingEventTypeConstants` method in your `ViewManager`:
+
+
+
+
+```kotlin
+class ReactImageManager : SimpleViewManager() {
+ ...
+ override fun getExportedCustomBubblingEventTypeConstants(): Map {
+ return mapOf(
+ "topChange" to mapOf(
+ "phasedRegistrationNames" to mapOf(
+ "bubbled" to "onChange"
+ )
+ )
+ )
+ }
+}
+```
+
+
+
+
+```java
+public class ReactImageManager extends SimpleViewManager {
+ ...
+ public Map getExportedCustomBubblingEventTypeConstants() {
+ return MapBuilder.builder().put(
+ "topChange",
+ MapBuilder.of(
+ "phasedRegistrationNames",
+ MapBuilder.of("bubbled", "onChange")
+ )
+ ).build();
+ }
+}
+```
+
+
+
+
+This callback is invoked with the raw event, which we typically process in the wrapper component to make a simpler API:
+
+```tsx {8-11,13-17} title="MyCustomView.tsx"
+import {useCallback} from 'react';
+import {requireNativeComponent} from 'react-native';
+
+const RCTMyCustomView = requireNativeComponent('RCTMyCustomView');
+
+export default function MyCustomView(props: {
+ // ...
+ /**
+ * Callback that is called continuously when the user is dragging the map.
+ */
+ onChangeMessage: (message: string) => unknown;
+}) {
+ const onChange = useCallback(
+ event => {
+ props.onChangeMessage?.(event.nativeEvent.message);
+ },
+ [props.onChangeMessage],
+ );
+
+ return ;
+}
+```
+
+## Integration with an Android Fragment example
+
+In order to integrate existing Native UI elements to your React Native app, you might need to use Android Fragments to give you a more granular control over your native component than returning a `View` from your `ViewManager`. You will need this if you want to add custom logic that is tied to your view with the help of [lifecycle methods](https://developer.android.com/guide/fragments/lifecycle), such as `onViewCreated`, `onPause`, `onResume`. The following steps will show you how to do it:
+
+### 1. Create an example custom view
+
+First, let's create a `CustomView` class which extends `FrameLayout` (the content of this view can be any view that you'd like to render)
+
+
+
+
+```kotlin title="CustomView.kt"
+// replace with your package
+package com.mypackage
+
+import android.content.Context
+import android.graphics.Color
+import android.widget.FrameLayout
+import android.widget.TextView
+
+class CustomView(context: Context) : FrameLayout(context) {
+ init {
+ // set padding and background color
+ setPadding(16,16,16,16)
+ setBackgroundColor(Color.parseColor("#5FD3F3"))
+
+ // add default text view
+ addView(TextView(context).apply {
+ text = "Welcome to Android Fragments with React Native."
+ })
+ }
+}
+```
+
+
+
+
+```java title="CustomView.java"
+// replace with your package
+package com.mypackage;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+
+public class CustomView extends FrameLayout {
+ public CustomView(@NonNull Context context) {
+ super(context);
+ // set padding and background color
+ this.setPadding(16,16,16,16);
+ this.setBackgroundColor(Color.parseColor("#5FD3F3"));
+
+ // add default text view
+ TextView text = new TextView(context);
+ text.setText("Welcome to Android Fragments with React Native.");
+ this.addView(text);
+ }
+}
+```
+
+
+
+
+### 2. Create a `Fragment`
+
+
+
+
+```kotlin title="MyFragment.kt"
+// replace with your package
+package com.mypackage
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+
+// replace with your view's import
+import com.mypackage.CustomView
+
+class MyFragment : Fragment() {
+ private lateinit var customView: CustomView
+
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
+ super.onCreateView(inflater, container, savedInstanceState)
+ customView = CustomView(requireNotNull(context))
+ return customView // this CustomView could be any view that you want to render
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+ // do any logic that should happen in an `onCreate` method, e.g:
+ // customView.onCreate(savedInstanceState);
+ }
+
+ override fun onPause() {
+ super.onPause()
+ // do any logic that should happen in an `onPause` method
+ // e.g.: customView.onPause();
+ }
+
+ override fun onResume() {
+ super.onResume()
+ // do any logic that should happen in an `onResume` method
+ // e.g.: customView.onResume();
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ // do any logic that should happen in an `onDestroy` method
+ // e.g.: customView.onDestroy();
+ }
+}
+```
+
+
+
+
+```java title="MyFragment.java"
+// replace with your package
+package com.mypackage;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import androidx.fragment.app.Fragment;
+
+// replace with your view's import
+import com.mypackage.CustomView;
+
+public class MyFragment extends Fragment {
+ CustomView customView;
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
+ super.onCreateView(inflater, parent, savedInstanceState);
+ customView = new CustomView(this.getContext());
+ return customView; // this CustomView could be any view that you want to render
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ // do any logic that should happen in an `onCreate` method, e.g:
+ // customView.onCreate(savedInstanceState);
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ // do any logic that should happen in an `onPause` method
+ // e.g.: customView.onPause();
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ // do any logic that should happen in an `onResume` method
+ // e.g.: customView.onResume();
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ // do any logic that should happen in an `onDestroy` method
+ // e.g.: customView.onDestroy();
+ }
+}
+```
+
+
+
+
+### 3. Create the `ViewManager` subclass
+
+
+
+
+```kotlin title="MyViewManager.kt"
+// replace with your package
+package com.mypackage
+
+import android.view.Choreographer
+import android.view.View
+import android.view.ViewGroup
+import android.widget.FrameLayout
+import androidx.fragment.app.FragmentActivity
+import com.facebook.react.bridge.ReactApplicationContext
+import com.facebook.react.bridge.ReadableArray
+import com.facebook.react.uimanager.ThemedReactContext
+import com.facebook.react.uimanager.ViewGroupManager
+import com.facebook.react.uimanager.annotations.ReactPropGroup
+
+class MyViewManager(
+ private val reactContext: ReactApplicationContext
+) : ViewGroupManager() {
+ private var propWidth: Int? = null
+ private var propHeight: Int? = null
+
+ override fun getName() = REACT_CLASS
+
+ /**
+ * Return a FrameLayout which will later hold the Fragment
+ */
+ override fun createViewInstance(reactContext: ThemedReactContext) =
+ FrameLayout(reactContext)
+
+ /**
+ * Map the "create" command to an integer
+ */
+ override fun getCommandsMap() = mapOf("create" to COMMAND_CREATE)
+
+ /**
+ * Handle "create" command (called from JS) and call createFragment method
+ */
+ override fun receiveCommand(
+ root: FrameLayout,
+ commandId: String,
+ args: ReadableArray?
+ ) {
+ super.receiveCommand(root, commandId, args)
+ val reactNativeViewId = requireNotNull(args).getInt(0)
+
+ when (commandId.toInt()) {
+ COMMAND_CREATE -> createFragment(root, reactNativeViewId)
+ }
+ }
+
+ @ReactPropGroup(names = ["width", "height"], customType = "Style")
+ fun setStyle(view: FrameLayout, index: Int, value: Int) {
+ if (index == 0) propWidth = value
+ if (index == 1) propHeight = value
+ }
+
+ /**
+ * Replace your React Native view with a custom fragment
+ */
+ fun createFragment(root: FrameLayout, reactNativeViewId: Int) {
+ val parentView = root.findViewById(reactNativeViewId)
+ setupLayout(parentView)
+
+ val myFragment = MyFragment()
+ val activity = reactContext.currentActivity as FragmentActivity
+ activity.supportFragmentManager
+ .beginTransaction()
+ .replace(reactNativeViewId, myFragment, reactNativeViewId.toString())
+ .commit()
+ }
+
+ fun setupLayout(view: View) {
+ Choreographer.getInstance().postFrameCallback(object: Choreographer.FrameCallback {
+ override fun doFrame(frameTimeNanos: Long) {
+ manuallyLayoutChildren(view)
+ view.viewTreeObserver.dispatchOnGlobalLayout()
+ Choreographer.getInstance().postFrameCallback(this)
+ }
+ })
+ }
+
+ /**
+ * Layout all children properly
+ */
+ private fun manuallyLayoutChildren(view: View) {
+ // propWidth and propHeight coming from react-native props
+ val width = requireNotNull(propWidth)
+ val height = requireNotNull(propHeight)
+
+ view.measure(
+ View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
+ View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY))
+
+ view.layout(0, 0, width, height)
+ }
+
+ companion object {
+ private const val REACT_CLASS = "MyViewManager"
+ private const val COMMAND_CREATE = 1
+ }
+}
+```
+
+
+
+
+```java title="MyViewManager.java"
+// replace with your package
+package com.mypackage;
+
+import android.view.Choreographer;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.FragmentActivity;
+
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.bridge.ReadableArray;
+import com.facebook.react.common.MapBuilder;
+import com.facebook.react.uimanager.annotations.ReactProp;
+import com.facebook.react.uimanager.annotations.ReactPropGroup;
+import com.facebook.react.uimanager.ViewGroupManager;
+import com.facebook.react.uimanager.ThemedReactContext;
+
+import java.util.Map;
+
+public class MyViewManager extends ViewGroupManager {
+
+ public static final String REACT_CLASS = "MyViewManager";
+ public final int COMMAND_CREATE = 1;
+ private int propWidth;
+ private int propHeight;
+
+ ReactApplicationContext reactContext;
+
+ public MyViewManager(ReactApplicationContext reactContext) {
+ this.reactContext = reactContext;
+ }
+
+ @Override
+ public String getName() {
+ return REACT_CLASS;
+ }
+
+ /**
+ * Return a FrameLayout which will later hold the Fragment
+ */
+ @Override
+ public FrameLayout createViewInstance(ThemedReactContext reactContext) {
+ return new FrameLayout(reactContext);
+ }
+
+ /**
+ * Map the "create" command to an integer
+ */
+ @Nullable
+ @Override
+ public Map getCommandsMap() {
+ return MapBuilder.of("create", COMMAND_CREATE);
+ }
+
+ /**
+ * Handle "create" command (called from JS) and call createFragment method
+ */
+ @Override
+ public void receiveCommand(
+ @NonNull FrameLayout root,
+ String commandId,
+ @Nullable ReadableArray args
+ ) {
+ super.receiveCommand(root, commandId, args);
+ int reactNativeViewId = args.getInt(0);
+ int commandIdInt = Integer.parseInt(commandId);
+
+ switch (commandIdInt) {
+ case COMMAND_CREATE:
+ createFragment(root, reactNativeViewId);
+ break;
+ default: {}
+ }
+ }
+
+ @ReactPropGroup(names = {"width", "height"}, customType = "Style")
+ public void setStyle(FrameLayout view, int index, Integer value) {
+ if (index == 0) {
+ propWidth = value;
+ }
+
+ if (index == 1) {
+ propHeight = value;
+ }
+ }
+
+ /**
+ * Replace your React Native view with a custom fragment
+ */
+ public void createFragment(FrameLayout root, int reactNativeViewId) {
+ ViewGroup parentView = (ViewGroup) root.findViewById(reactNativeViewId);
+ setupLayout(parentView);
+
+ final MyFragment myFragment = new MyFragment();
+ FragmentActivity activity = (FragmentActivity) reactContext.getCurrentActivity();
+ activity.getSupportFragmentManager()
+ .beginTransaction()
+ .replace(reactNativeViewId, myFragment, String.valueOf(reactNativeViewId))
+ .commit();
+ }
+
+ public void setupLayout(View view) {
+ Choreographer.getInstance().postFrameCallback(new Choreographer.FrameCallback() {
+ @Override
+ public void doFrame(long frameTimeNanos) {
+ manuallyLayoutChildren(view);
+ view.getViewTreeObserver().dispatchOnGlobalLayout();
+ Choreographer.getInstance().postFrameCallback(this);
+ }
+ });
+ }
+
+ /**
+ * Layout all children properly
+ */
+ public void manuallyLayoutChildren(View view) {
+ // propWidth and propHeight coming from react-native props
+ int width = propWidth;
+ int height = propHeight;
+
+ view.measure(
+ View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
+ View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
+
+ view.layout(0, 0, width, height);
+ }
+}
+```
+
+
+
+
+### 4. Register the `ViewManager`
+
+
+
+
+```kotlin title="MyPackage.kt"
+// replace with your package
+package com.mypackage
+
+import com.facebook.react.ReactPackage
+import com.facebook.react.bridge.ReactApplicationContext
+import com.facebook.react.uimanager.ViewManager
+
+class MyPackage : ReactPackage {
+ ...
+ override fun createViewManagers(
+ reactContext: ReactApplicationContext
+ ) = listOf(MyViewManager(reactContext))
+}
+```
+
+
+
+
+```java title="MyPackage.java"
+// replace with your package
+package com.mypackage;
+
+import com.facebook.react.ReactPackage;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.uimanager.ViewManager;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class MyPackage implements ReactPackage {
+
+ @Override
+ public List createViewManagers(ReactApplicationContext reactContext) {
+ return Arrays.asList(
+ new MyViewManager(reactContext)
+ );
+ }
+
+}
+```
+
+
+
+
+### 5. Register the `Package`
+
+
+
+
+```kotlin title="MainApplication.kt"
+override fun getPackages(): List =
+ PackageList(this).packages.apply {
+ // Packages that cannot be autolinked yet can be added manually here, for example:
+ // add(MyReactNativePackage())
+ add(MyAppPackage())
+ }
+```
+
+
+
+
+```java title="MainApplication.java"
+@Override
+protected List getPackages() {
+ List packages = new PackageList(this).getPackages();
+ // Packages that cannot be autolinked yet can be added manually here, for example:
+ // packages.add(new MyReactNativePackage());
+ packages.add(new MyAppPackage());
+ return packages;
+}
+```
+
+
+
+
+### 6. Implement the JavaScript module
+
+I. Start with custom View manager:
+
+```tsx title="MyViewManager.tsx"
+import {requireNativeComponent} from 'react-native';
+
+export const MyViewManager =
+ requireNativeComponent('MyViewManager');
+```
+
+II. Then implement custom View calling the `create` method:
+
+```tsx title="MyView.tsx"
+import React, {useEffect, useRef} from 'react';
+import {
+ PixelRatio,
+ UIManager,
+ findNodeHandle,
+} from 'react-native';
+
+import {MyViewManager} from './my-view-manager';
+
+const createFragment = viewId =>
+ UIManager.dispatchViewManagerCommand(
+ viewId,
+ // we are calling the 'create' command
+ UIManager.MyViewManager.Commands.create.toString(),
+ [viewId],
+ );
+
+export const MyView = () => {
+ const ref = useRef(null);
+
+ useEffect(() => {
+ const viewId = findNodeHandle(ref.current);
+ createFragment(viewId);
+ }, []);
+
+ return (
+
+ );
+};
+```
+
+If you want to expose property setters using `@ReactProp` (or `@ReactPropGroup`) annotation see the [ImageView example](#imageview-example) above.
diff --git a/website/versioned_docs/version-0.86/legacy/native-components-ios.md b/website/versioned_docs/version-0.86/legacy/native-components-ios.md
new file mode 100644
index 00000000000..b9eb22a2dfd
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/native-components-ios.md
@@ -0,0 +1,479 @@
+---
+id: native-components-ios
+title: iOS Native UI Components
+---
+
+import NativeDeprecated from '../the-new-architecture/\_markdown_native_deprecation.mdx'
+
+
+
+There are tons of native UI widgets out there ready to be used in the latest apps - some of them are part of the platform, others are available as third-party libraries, and still more might be in use in your very own portfolio. React Native has several of the most critical platform components already wrapped, like `ScrollView` and `TextInput`, but not all of them, and certainly not ones you might have written yourself for a previous app. Fortunately, we can wrap up these existing components for seamless integration with your React Native application.
+
+Like the native module guide, this too is a more advanced guide that assumes you are somewhat familiar with iOS programming. This guide will show you how to build a native UI component, walking you through the implementation of a subset of the existing `MapView` component available in the core React Native library.
+
+## iOS MapView example
+
+Let's say we want to add an interactive Map to our app - might as well use [`MKMapView`](https://developer.apple.com/library/prerelease/mac/documentation/MapKit/Reference/MKMapView_Class/index.html), we only need to make it usable from JavaScript.
+
+Native views are created and manipulated by subclasses of `RCTViewManager`. These subclasses are similar in function to view controllers, but are essentially singletons - only one instance of each is created by the bridge. They expose native views to the `RCTUIManager`, which delegates back to them to set and update the properties of the views as necessary. The `RCTViewManager`s are also typically the delegates for the views, sending events back to JavaScript via the bridge.
+
+To expose a view you can:
+
+- Subclass `RCTViewManager` to create a manager for your component.
+- Add the `RCT_EXPORT_MODULE()` marker macro.
+- Implement the `-(UIView *)view` method.
+
+```objectivec title='RNTMapManager.m'
+#import
+
+#import
+
+@interface RNTMapManager : RCTViewManager
+@end
+
+@implementation RNTMapManager
+
+RCT_EXPORT_MODULE(RNTMap)
+
+- (UIView *)view
+{
+ return [[MKMapView alloc] init];
+}
+
+@end
+```
+
+:::note
+Do not attempt to set the `frame` or `backgroundColor` properties on the `UIView` instance that you expose through the `-view` method.
+React Native will overwrite the values set by your custom class in order to match your JavaScript component's layout props.
+If you need this granularity of control it might be better to wrap the `UIView` instance you want to style in another `UIView` and return the wrapper `UIView` instead.
+See [Issue 2948](https://github.com/facebook/react-native/issues/2948) for more context.
+:::
+
+:::info
+In the example above, we prefixed our class name with `RNT`. Prefixes are used to avoid name collisions with other frameworks.
+Apple frameworks use two-letter prefixes, and React Native uses `RCT` as a prefix. In order to avoid name collisions, we recommend using a three-letter prefix other than `RCT` in your own classes.
+:::
+
+Then you need a little bit of JavaScript to make this a usable React component:
+
+```tsx {3} title="MapView.tsx"
+import {requireNativeComponent} from 'react-native';
+
+export default requireNativeComponent('RNTMap');
+```
+
+The `requireNativeComponent` function automatically resolves `RNTMap` to `RNTMapManager` and exports our native view for use in JavaScript.
+
+```tsx title="MyApp.tsx"
+import MapView from './MapView.tsx';
+
+export default function MyApp() {
+ return ;
+}
+```
+
+:::note
+When rendering, don't forget to stretch the view, otherwise you'll be staring at a blank screen.
+:::
+
+This is now a fully-functioning native map view component in JavaScript, complete with pinch-zoom and other native gesture support. We can't really control it from JavaScript yet, though.
+
+## Properties
+
+The first thing we can do to make this component more usable is to bridge over some native properties. Let's say we want to be able to disable zooming and specify the visible region. Disabling zoom is a boolean, so we add this one line:
+
+```objectivec title='RNTMapManager.m'
+RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
+```
+
+Note that we explicitly specify the type as `BOOL` - React Native uses `RCTConvert` under the hood to convert all sorts of different data types when talking over the bridge, and bad values will show convenient "RedBox" errors to let you know there is an issue ASAP. When things are straightforward like this, the whole implementation is taken care of for you by this macro.
+
+Now to actually disable zooming, we set the property in JavaScript:
+
+```tsx {4} title="MyApp.tsx"
+import MapView from './MapView.tsx';
+
+export default function MyApp() {
+ return ;
+}
+```
+
+To document the properties (and which values they accept) of our MapView component we'll add a wrapper component and document the interface with TypeScript:
+
+```tsx {6-9} title="MapView.tsx"
+import {requireNativeComponent} from 'react-native';
+
+const RNTMap = requireNativeComponent('RNTMap');
+
+export default function MapView(props: {
+ /**
+ * Whether the user may use pinch gestures to zoom in and out.
+ */
+ zoomEnabled?: boolean;
+}) {
+ return ;
+}
+```
+
+Now we have a nicely documented wrapper component to work with.
+
+Next, let's add the more complex `region` prop. We start by adding the native code:
+
+```objectivec title='RNTMapManager.m'
+RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, MKMapView)
+{
+ [view setRegion:json ? [RCTConvert MKCoordinateRegion:json] : defaultView.region animated:YES];
+}
+```
+
+Ok, this is more complicated than the `BOOL` case we had before. Now we have a `MKCoordinateRegion` type that needs a conversion function, and we have custom code so that the view will animate when we set the region from JS. Within the function body that we provide, `json` refers to the raw value that has been passed from JS. There is also a `view` variable which gives us access to the manager's view instance, and a `defaultView` that we use to reset the property back to the default value if JS sends us a null sentinel.
+
+You could write any conversion function you want for your view - here is the implementation for `MKCoordinateRegion` via a category on `RCTConvert`. It uses an already existing category of ReactNative `RCTConvert+CoreLocation`:
+
+```objectivec title='RNTMapManager.m'
+#import "RCTConvert+Mapkit.h"
+```
+
+```objectivec title='RCTConvert+Mapkit.h'
+#import
+#import
+#import
+#import
+
+@interface RCTConvert (Mapkit)
+
++ (MKCoordinateSpan)MKCoordinateSpan:(id)json;
++ (MKCoordinateRegion)MKCoordinateRegion:(id)json;
+
+@end
+
+@implementation RCTConvert(MapKit)
+
++ (MKCoordinateSpan)MKCoordinateSpan:(id)json
+{
+ json = [self NSDictionary:json];
+ return (MKCoordinateSpan){
+ [self CLLocationDegrees:json[@"latitudeDelta"]],
+ [self CLLocationDegrees:json[@"longitudeDelta"]]
+ };
+}
+
++ (MKCoordinateRegion)MKCoordinateRegion:(id)json
+{
+ return (MKCoordinateRegion){
+ [self CLLocationCoordinate2D:json],
+ [self MKCoordinateSpan:json]
+ };
+}
+
+@end
+```
+
+These conversion functions are designed to safely process any JSON that the JS might throw at them by displaying "RedBox" errors and returning standard initialization values when missing keys or other developer errors are encountered.
+
+To finish up support for the `region` prop, we can document it with TypeScript:
+
+```tsx {6-25} title="MapView.tsx"
+import {requireNativeComponent} from 'react-native';
+
+const RNTMap = requireNativeComponent('RNTMap');
+
+export default function MapView(props: {
+ /**
+ * The region to be displayed by the map.
+ *
+ * The region is defined by the center coordinates and the span of
+ * coordinates to display.
+ */
+ region?: {
+ /**
+ * Coordinates for the center of the map.
+ */
+ latitude: number;
+ longitude: number;
+
+ /**
+ * Distance between the minimum and the maximum latitude/longitude
+ * to be displayed.
+ */
+ latitudeDelta: number;
+ longitudeDelta: number;
+ };
+ /**
+ * Whether the user may use pinch gestures to zoom in and out.
+ */
+ zoomEnabled?: boolean;
+}) {
+ return ;
+}
+```
+
+We can now supply the `region` prop to `MapView`:
+
+```tsx {4-9,12} title="MyApp.tsx"
+import MapView from './MapView.tsx';
+
+export default function MyApp() {
+ const region = {
+ latitude: 37.48,
+ longitude: -122.16,
+ latitudeDelta: 0.1,
+ longitudeDelta: 0.1,
+ };
+ return (
+
+ );
+}
+```
+
+## Events
+
+So now we have a native map component that we can control freely from JS, but how do we deal with events from the user, like pinch-zooms or panning to change the visible region?
+
+Until now we've only returned a `MKMapView` instance from our manager's `-(UIView *)view` method. We can't add new properties to `MKMapView` so we have to create a new subclass from `MKMapView` which we use for our View. We can then add a `onRegionChange` callback on this subclass:
+
+```objectivec title='RNTMapView.h'
+#import
+
+#import
+
+@interface RNTMapView: MKMapView
+
+@property (nonatomic, copy) RCTBubblingEventBlock onRegionChange;
+
+@end
+```
+
+```objectivec title='RNTMapView.m'
+#import "RNTMapView.h"
+
+@implementation RNTMapView
+
+@end
+```
+
+Note that all `RCTBubblingEventBlock` must be prefixed with `on`. Next, declare an event handler property on `RNTMapManager`, make it a delegate for all the views it exposes, and forward events to JS by calling the event handler block from the native view.
+
+```objectivec {9,17,31-48} title='RNTMapManager.m'
+#import
+#import
+
+#import "RNTMapView.h"
+#import "RCTConvert+Mapkit.h"
+
+@interface RNTMapManager : RCTViewManager
+@end
+
+@implementation RNTMapManager
+
+RCT_EXPORT_MODULE()
+
+RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
+RCT_EXPORT_VIEW_PROPERTY(onRegionChange, RCTBubblingEventBlock)
+
+RCT_CUSTOM_VIEW_PROPERTY(region, MKCoordinateRegion, MKMapView)
+{
+ [view setRegion:json ? [RCTConvert MKCoordinateRegion:json] : defaultView.region animated:YES];
+}
+
+- (UIView *)view
+{
+ RNTMapView *map = [RNTMapView new];
+ map.delegate = self;
+ return map;
+}
+
+#pragma mark MKMapViewDelegate
+
+- (void)mapView:(RNTMapView *)mapView regionDidChangeAnimated:(BOOL)animated
+{
+ if (!mapView.onRegionChange) {
+ return;
+ }
+
+ MKCoordinateRegion region = mapView.region;
+ mapView.onRegionChange(@{
+ @"region": @{
+ @"latitude": @(region.center.latitude),
+ @"longitude": @(region.center.longitude),
+ @"latitudeDelta": @(region.span.latitudeDelta),
+ @"longitudeDelta": @(region.span.longitudeDelta),
+ }
+ });
+}
+@end
+```
+
+In the delegate method `-mapView:regionDidChangeAnimated:` the event handler block is called on the corresponding view with the region data. Calling the `onRegionChange` event handler block results in calling the same callback prop in JavaScript. This callback is invoked with the raw event, which we typically process in the wrapper component to simplify the API:
+
+```tsx {3-10,14-17,19} title="MapView.tsx"
+// ...
+
+type RegionChangeEvent = {
+ nativeEvent: {
+ latitude: number;
+ longitude: number;
+ latitudeDelta: number;
+ longitudeDelta: number;
+ };
+};
+
+export default function MapView(props: {
+ // ...
+ /**
+ * Callback that is called continuously when the user is dragging the map.
+ */
+ onRegionChange: (event: RegionChangeEvent) => unknown;
+}) {
+ return ;
+}
+```
+
+```tsx {6-9,14} title="MyApp.tsx"
+import MapView from './MapView.tsx';
+
+export default function MyApp() {
+ // ...
+
+ const onRegionChange = useCallback(event => {
+ const {region} = event.nativeEvent;
+ // Do something with `region.latitude`, etc.
+ });
+
+ return (
+
+ );
+}
+```
+
+## Handling multiple native views
+
+A React Native view can have more than one child view in the view tree eg.
+
+```tsx
+
+
+
+
+
+```
+
+In this example, the class `MyNativeView` is a wrapper for a `NativeComponent` and exposes methods, which will be called on the iOS platform. `MyNativeView` is defined in `MyNativeView.ios.js` and contains proxy methods of `NativeComponent`.
+
+When the user interacts with the component, like clicking the button, the `backgroundColor` of `MyNativeView` changes. In this case `UIManager` would not know which `MyNativeView` should be handled and which one should change `backgroundColor`. Below you will find a solution to this problem:
+
+```tsx
+
+
+
+ {
+ this.myNativeReference.callNativeMethod();
+ }}
+ />
+
+```
+
+Now the above component has a reference to a particular `MyNativeView` which allows us to use a specific instance of `MyNativeView`. Now the button can control which `MyNativeView` should change its `backgroundColor`. In this example let's assume that `callNativeMethod` changes `backgroundColor`.
+
+```tsx title="MyNativeView.ios.tsx"
+class MyNativeView extends React.Component {
+ callNativeMethod = () => {
+ UIManager.dispatchViewManagerCommand(
+ ReactNative.findNodeHandle(this),
+ UIManager.getViewManagerConfig('RNCMyNativeView').Commands
+ .callNativeMethod,
+ [],
+ );
+ };
+
+ render() {
+ return ;
+ }
+}
+```
+
+`callNativeMethod` is our custom iOS method which for example changes the `backgroundColor` which is exposed through `MyNativeView`. This method uses `UIManager.dispatchViewManagerCommand` which needs 3 parameters:
+
+- `(nonnull NSNumber \*)reactTag` - id of react view.
+- `commandID:(NSInteger)commandID` - Id of the native method that should be called
+- `commandArgs:(NSArray \*)commandArgs` - Args of the native method that we can pass from JS to native.
+
+```objectivec title='RNCMyNativeViewManager.m'
+#import
+#import
+#import
+
+RCT_EXPORT_METHOD(callNativeMethod:(nonnull NSNumber*) reactTag) {
+ [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary *viewRegistry) {
+ NativeView *view = viewRegistry[reactTag];
+ if (!view || ![view isKindOfClass:[NativeView class]]) {
+ RCTLogError(@"Cannot find NativeView with tag #%@", reactTag);
+ return;
+ }
+ [view callNativeMethod];
+ }];
+
+}
+```
+
+Here the `callNativeMethod` is defined in the `RNCMyNativeViewManager.m` file and contains only one parameter which is `(nonnull NSNumber*) reactTag`. This exported function will find a particular view using `addUIBlock` which contains the `viewRegistry` parameter and returns the component based on `reactTag` allowing it to call the method on the correct component.
+
+## Styles
+
+Since all our native react views are subclasses of `UIView`, most style attributes will work like you would expect out of the box. Some components will want a default style, however, for example `UIDatePicker` which is a fixed size. This default style is important for the layout algorithm to work as expected, but we also want to be able to override the default style when using the component. `DatePickerIOS` does this by wrapping the native component in an extra view, which has flexible styling, and using a fixed style (which is generated with constants passed in from native) on the inner native component:
+
+```tsx title="DatePickerIOS.ios.tsx"
+import {UIManager} from 'react-native';
+const RCTDatePickerIOSConsts = UIManager.RCTDatePicker.Constants;
+...
+ render: function() {
+ return (
+
+
+
+ );
+ }
+});
+
+const styles = StyleSheet.create({
+ rkDatePickerIOS: {
+ height: RCTDatePickerIOSConsts.ComponentHeight,
+ width: RCTDatePickerIOSConsts.ComponentWidth,
+ },
+});
+```
+
+The `RCTDatePickerIOSConsts` constants are exported from native by grabbing the actual frame of the native component like so:
+
+```objectivec title='RCTDatePickerManager.m'
+- (NSDictionary *)constantsToExport
+{
+ UIDatePicker *dp = [[UIDatePicker alloc] init];
+ [dp layoutIfNeeded];
+
+ return @{
+ @"ComponentHeight": @(CGRectGetHeight(dp.frame)),
+ @"ComponentWidth": @(CGRectGetWidth(dp.frame)),
+ @"DatePickerModes": @{
+ @"time": @(UIDatePickerModeTime),
+ @"date": @(UIDatePickerModeDate),
+ @"datetime": @(UIDatePickerModeDateAndTime),
+ }
+ };
+}
+```
+
+This guide covered many of the aspects of bridging over custom native components, but there is even more you might need to consider, such as custom hooks for inserting and laying out subviews. If you want to go even deeper, check out the [source code](https://github.com/facebook/react-native/tree/main/packages/react-native/React/Views) of some of the implemented components.
diff --git a/website/versioned_docs/version-0.86/legacy/native-modules-android.md b/website/versioned_docs/version-0.86/legacy/native-modules-android.md
new file mode 100644
index 00000000000..82fe222f628
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/native-modules-android.md
@@ -0,0 +1,1193 @@
+---
+id: native-modules-android
+title: Android Native Modules
+---
+
+import NativeDeprecated from '../the-new-architecture/\_markdown_native_deprecation.mdx'
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+
+
+Welcome to Native Modules for Android. Please start by reading the [Native Modules Intro](native-modules-intro) for an intro to what native modules are.
+
+## Create a Calendar Native Module
+
+In the following guide you will create a native module, `CalendarModule`, that will allow you to access Android’s calendar APIs from JavaScript. By the end, you will be able to call `CalendarModule.createCalendarEvent('Dinner Party', 'My House');` from JavaScript, invoking a Java/Kotlin method that creates a calendar event.
+
+### Setup
+
+To get started, open up the Android project within your React Native application in Android Studio. You can find your Android project here within a React Native app:
+
+
+
+ Image of where you can find your Android project
+
+
+We recommend using Android Studio to write your native code. Android Studio is an IDE built for Android development and using it will help you resolve minor issues like code syntax errors quickly.
+
+We also recommend enabling [Gradle Daemon](https://docs.gradle.org/2.9/userguide/gradle_daemon.html) to speed up builds as you iterate on Java/Kotlin code.
+
+### Create A Custom Native Module File
+
+The first step is to create the (`CalendarModule.java` or `CalendarModule.kt`) Java/Kotlin file inside `android/app/src/main/java/com/your-app-name/` folder (the folder is the same for both Kotlin and Java). This Java/Kotlin file will contain your native module Java/Kotlin class.
+
+
+
+ Image of how to add the CalendarModuleClass
+
+
+Then add the following content:
+
+
+
+
+```java
+package com.your-apps-package-name; // replace your-apps-package-name with your app’s package name
+import com.facebook.react.bridge.NativeModule;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.bridge.ReactContext;
+import com.facebook.react.bridge.ReactContextBaseJavaModule;
+import com.facebook.react.bridge.ReactMethod;
+import java.util.Map;
+import java.util.HashMap;
+
+public class CalendarModule extends ReactContextBaseJavaModule {
+ CalendarModule(ReactApplicationContext context) {
+ super(context);
+ }
+}
+```
+
+
+
+
+```kotlin
+package com.your-apps-package-name; // replace your-apps-package-name with your app’s package name
+import com.facebook.react.bridge.NativeModule
+import com.facebook.react.bridge.ReactApplicationContext
+import com.facebook.react.bridge.ReactContext
+import com.facebook.react.bridge.ReactContextBaseJavaModule
+import com.facebook.react.bridge.ReactMethod
+
+class CalendarModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {...}
+```
+
+
+
+
+As you can see, your `CalendarModule` class extends the `ReactContextBaseJavaModule` class. For Android, Java/Kotlin native modules are written as classes that extend `ReactContextBaseJavaModule` and implement the functionality required by JavaScript.
+
+:::note
+It is worth noting that technically Java/Kotlin classes only need to extend the `BaseJavaModule` class or implement the `NativeModule` interface to be considered a Native Module by React Native.
+
+However we recommend that you use `ReactContextBaseJavaModule`, as shown above. `ReactContextBaseJavaModule` gives access to the `ReactApplicationContext` (RAC), which is useful for Native Modules that need to hook into activity lifecycle methods. Using `ReactContextBaseJavaModule` will also make it easier to make your native module type-safe in the future. For native module type-safety, which is coming in future releases, React Native looks at each native module's JavaScript spec and generates an abstract base class that extends `ReactContextBaseJavaModule`.
+:::
+
+### Module Name
+
+All Java/Kotlin native modules in Android need to implement the `getName()` method. This method returns a string, which represents the name of the native module. The native module can then be accessed in JavaScript using its name. For example, in the below code snippet, `getName()` returns `"CalendarModule"`.
+
+
+
+
+```java
+// add to CalendarModule.java
+@Override
+public String getName() {
+ return "CalendarModule";
+}
+```
+
+
+
+
+```kotlin
+// add to CalendarModule.kt
+override fun getName() = "CalendarModule"
+```
+
+
+
+
+The native module can then be accessed in JS like this:
+
+```tsx
+const {CalendarModule} = ReactNative.NativeModules;
+```
+
+### Export a Native Method to JavaScript
+
+Next you will need to add a method to your native module that will create calendar events and can be invoked in JavaScript. All native module methods meant to be invoked from JavaScript must be annotated with `@ReactMethod`.
+
+Set up a method `createCalendarEvent()` for `CalendarModule` that can be invoked in JS through `CalendarModule.createCalendarEvent()`. For now, the method will take in a name and location as strings. Argument type options will be covered shortly.
+
+
+
+
+```java
+@ReactMethod
+public void createCalendarEvent(String name, String location) {
+}
+```
+
+
+
+
+```kotlin
+@ReactMethod fun createCalendarEvent(name: String, location: String) {}
+```
+
+
+
+
+Add a debug log in the method to confirm it has been invoked when you call it from your application. Below is an example of how you can import and use the [Log](https://developer.android.com/reference/android/util/Log) class from the Android util package:
+
+
+
+
+```java
+import android.util.Log;
+
+@ReactMethod
+public void createCalendarEvent(String name, String location) {
+ Log.d("CalendarModule", "Create event called with name: " + name
+ + " and location: " + location);
+}
+```
+
+
+
+
+```kotlin
+import android.util.Log
+
+@ReactMethod
+fun createCalendarEvent(name: String, location: String) {
+ Log.d("CalendarModule", "Create event called with name: $name and location: $location")
+}
+```
+
+
+
+
+Once you finish implementing the native module and hook it up in JavaScript, you can follow [these steps](https://developer.android.com/studio/debug/am-logcat.html) to view the logs from your app.
+
+### Synchronous Methods
+
+You can pass `isBlockingSynchronousMethod = true` to a native method to mark it as a synchronous method.
+
+
+
+
+```java
+@ReactMethod(isBlockingSynchronousMethod = true)
+```
+
+
+
+
+```kotlin
+@ReactMethod(isBlockingSynchronousMethod = true)
+```
+
+
+
+
+At the moment, we do not recommend this, since calling methods synchronously can have strong performance penalties and introduce threading-related bugs to your native modules. Additionally, please note that if you choose to enable `isBlockingSynchronousMethod`, your app can no longer use the Google Chrome debugger. This is because synchronous methods require the JS VM to share memory with the app. For the Google Chrome debugger, React Native runs inside the JS VM in Google Chrome, and communicates asynchronously with the mobile devices via WebSockets.
+
+### Register the Module (Android Specific)
+
+Once a native module is written, it needs to be registered with React Native. In order to do so, you need to add your native module to a `ReactPackage` and register the `ReactPackage` with React Native. During initialization, React Native will loop over all packages, and for each `ReactPackage`, register each native module within.
+
+React Native invokes the method `createNativeModules()` on a `ReactPackage` in order to get the list of native modules to register. For Android, if a module is not instantiated and returned in createNativeModules it will not be available from JavaScript.
+
+To add your Native Module to `ReactPackage`, first create a new Java/Kotlin Class named (`MyAppPackage.java` or `MyAppPackage.kt`) that implements `ReactPackage` inside the `android/app/src/main/java/com/your-app-name/` folder:
+
+Then add the following content:
+
+
+
+
+```java
+package com.your-app-name; // replace your-app-name with your app’s name
+import com.facebook.react.ReactPackage;
+import com.facebook.react.bridge.NativeModule;
+import com.facebook.react.bridge.ReactApplicationContext;
+import com.facebook.react.uimanager.ViewManager;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class MyAppPackage implements ReactPackage {
+
+ @Override
+ public List createViewManagers(ReactApplicationContext reactContext) {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List createNativeModules(
+ ReactApplicationContext reactContext) {
+ List modules = new ArrayList<>();
+
+ modules.add(new CalendarModule(reactContext));
+
+ return modules;
+ }
+
+}
+```
+
+
+
+
+```kotlin
+package com.your-app-name // replace your-app-name with your app’s name
+
+import android.view.View
+import com.facebook.react.ReactPackage
+import com.facebook.react.bridge.NativeModule
+import com.facebook.react.bridge.ReactApplicationContext
+import com.facebook.react.uimanager.ReactShadowNode
+import com.facebook.react.uimanager.ViewManager
+
+class MyAppPackage : ReactPackage {
+
+ override fun createViewManagers(
+ reactContext: ReactApplicationContext
+ ): MutableList>> = mutableListOf()
+
+ override fun createNativeModules(
+ reactContext: ReactApplicationContext
+ ): MutableList = listOf(CalendarModule(reactContext)).toMutableList()
+}
+```
+
+
+
+
+This file imports the native module you created, `CalendarModule`. It then instantiates `CalendarModule` within the `createNativeModules()` function and returns it as a list of `NativeModules` to register. If you add more native modules down the line, you can also instantiate them and add them to the list returned here.
+
+:::note
+It is worth noting that this way of registering native modules eagerly initializes all native modules when the application starts, which adds to the startup time of an application. You can use [TurboReactPackage](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/TurboReactPackage.kt) as an alternative. Instead of `createNativeModules`, which return a list of instantiated native module objects, TurboReactPackage implements a `getModule(String name, ReactApplicationContext rac)` method that creates the native module object, when required. TurboReactPackage is a bit more complicated to implement at the moment. In addition to implementing a `getModule()` method, you have to implement a `getReactModuleInfoProvider()` method, which returns a list of all the native modules the package can instantiate along with a function that instantiates them, example [here](https://github.com/facebook/react-native/blob/8ac467c51b94c82d81930b4802b2978c85539925/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java#L86-L165). Again, using TurboReactPackage will allow your application to have a faster startup time, but it is currently a bit cumbersome to write. So proceed with caution if you choose to use TurboReactPackages.
+:::
+
+To register the `CalendarModule` package, you must add `MyAppPackage` to the list of packages returned in ReactNativeHost's `getPackages()` method. Open up your `MainApplication.java` or `MainApplication.kt` file, which can be found in the following path: `android/app/src/main/java/com/your-app-name/`.
+
+Locate ReactNativeHost’s `getPackages()` method and add your package to the packages list `getPackages()` returns:
+
+
+
+
+```java
+@Override
+protected List getPackages() {
+ List packages = new PackageList(this).getPackages();
+ // Packages that cannot be autolinked yet can be added manually here, for example:
+ // packages.add(new MyReactNativePackage());
+ packages.add(new MyAppPackage());
+ return packages;
+}
+```
+
+
+
+
+```kotlin
+override fun getPackages(): List =
+ PackageList(this).packages.apply {
+ // Packages that cannot be autolinked yet can be added manually here, for example:
+ // add(MyReactNativePackage())
+ add(MyAppPackage())
+ }
+```
+
+
+
+
+You have now successfully registered your native module for Android!
+
+### Test What You Have Built
+
+At this point, you have set up the basic scaffolding for your native module in Android. Test that out by accessing the native module and invoking its exported method in JavaScript.
+
+Find a place in your application where you would like to add a call to the native module’s `createCalendarEvent()` method. Below is an example of a component, `NewModuleButton` you can add in your app. You can invoke the native module inside `NewModuleButton`'s `onPress()` function.
+
+```tsx
+import React from 'react';
+import {NativeModules, Button} from 'react-native';
+
+const NewModuleButton = () => {
+ const onPress = () => {
+ console.log('We will invoke the native module here!');
+ };
+
+ return (
+
+ );
+};
+
+export default NewModuleButton;
+```
+
+In order to access your native module from JavaScript you need to first import `NativeModules` from React Native:
+
+```tsx
+import {NativeModules} from 'react-native';
+```
+
+You can then access the `CalendarModule` native module off of `NativeModules`.
+
+```tsx
+const {CalendarModule} = NativeModules;
+```
+
+Now that you have the CalendarModule native module available, you can invoke your native method `createCalendarEvent()`. Below it is added to the `onPress()` method in `NewModuleButton`:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEvent('testName', 'testLocation');
+};
+```
+
+The final step is to rebuild the React Native app so that you can have the latest native code (with your new native module!) available. In your command line, where the react native application is located, run the following:
+
+
+
+
+```shell
+npm run android
+```
+
+
+
+
+```shell
+yarn android
+```
+
+
+
+
+### Building as You Iterate
+
+As you work through these guides and iterate on your native module, you will need to do a native rebuild of your application to access your most recent changes from JavaScript. This is because the code that you are writing sits within the native part of your application. While React Native’s metro bundler can watch for changes in JavaScript and rebuild on the fly for you, it will not do so for native code. So if you want to test your latest native changes you need to rebuild by using the above command.
+
+### Recap✨
+
+You should now be able to invoke your `createCalendarEvent()` method on your native module in the app. In our example this occurs by pressing the `NewModuleButton`. You can confirm this by viewing the log you set up in your `createCalendarEvent()` method. You can follow [these steps](https://developer.android.com/studio/debug/am-logcat.html) to view ADB logs in your app. You should then be able to search for your `Log.d` message (in our example “Create event called with name: testName and location: testLocation”) and see your message logged each time you invoke your native module method.
+
+
+
+ Image of ADB logs in Android Studio
+
+
+At this point you have created an Android native module and invoked its native method from JavaScript in your React Native application. You can read on to learn more about things like argument types available to a native module method and how to setup callbacks and promises.
+
+## Beyond a Calendar Native Module
+
+### Better Native Module Export
+
+Importing your native module by pulling it off of `NativeModules` like above is a bit clunky.
+
+To save consumers of your native module from needing to do that each time they want to access your native module, you can create a JavaScript wrapper for the module. Create a new JavaScript file named `CalendarModule.js` with the following content:
+
+```tsx
+/**
+* This exposes the native CalendarModule module as a JS module. This has a
+* function 'createCalendarEvent' which takes the following parameters:
+
+* 1. String name: A string representing the name of the event
+* 2. String location: A string representing the location of the event
+*/
+import {NativeModules} from 'react-native';
+const {CalendarModule} = NativeModules;
+export default CalendarModule;
+```
+
+This JavaScript file also becomes a good location for you to add any JavaScript side functionality. For example, if you use a type system like TypeScript you can add type annotations for your native module here. While React Native does not yet support Native to JS type safety, all your JS code will be type safe. Doing so will also make it easier for you to switch to type-safe native modules down the line. Below is an example of adding type safety to the CalendarModule:
+
+```tsx
+/**
+ * This exposes the native CalendarModule module as a JS module. This has a
+ * function 'createCalendarEvent' which takes the following parameters:
+ *
+ * 1. String name: A string representing the name of the event
+ * 2. String location: A string representing the location of the event
+ */
+import {NativeModules} from 'react-native';
+const {CalendarModule} = NativeModules;
+interface CalendarInterface {
+ createCalendarEvent(name: string, location: string): void;
+}
+export default CalendarModule as CalendarInterface;
+```
+
+In your other JavaScript files you can access the native module and invoke its method like this:
+
+```tsx
+import CalendarModule from './CalendarModule';
+CalendarModule.createCalendarEvent('foo', 'bar');
+```
+
+:::note
+This assumes that the place you are importing `CalendarModule` is in the same hierarchy as `CalendarModule.js`. Please update the relative import as necessary.
+:::
+
+### Argument Types
+
+When a native module method is invoked in JavaScript, React Native converts the arguments from JS objects to their Java/Kotlin object analogues. So for example, if your Java Native Module method accepts a double, in JS you need to call the method with a number. React Native will handle the conversion for you. Below is a list of the argument types supported for native module methods and the JavaScript equivalents they map to.
+
+| Java | Kotlin | JavaScript |
+| ------------- | ------------- | ---------- |
+| Boolean | Boolean | ?boolean |
+| boolean | | boolean |
+| Double | Double | ?number |
+| double | | number |
+| String | String | string |
+| Callback | Callback | Function |
+| Promise | Promise | Promise |
+| ReadableMap | ReadableMap | Object |
+| ReadableArray | ReadableArray | Array |
+
+:::info
+The following types are currently supported but will not be supported in TurboModules. Please avoid using them:
+
+- Integer Java/Kotlin -> ?number
+- Float Java/Kotlin -> ?number
+- int Java -> number
+- float Java -> number
+ :::
+
+For argument types not listed above, you will need to handle the conversion yourself. For example, in Android, `Date` conversion is not supported out of the box. You can handle the conversion to the `Date` type within the native method yourself like so:
+
+
+
+
+```java
+ String dateFormat = "yyyy-MM-dd";
+ SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
+ Calendar eStartDate = Calendar.getInstance();
+ try {
+ eStartDate.setTime(sdf.parse(startDate));
+ }
+
+```
+
+
+
+
+```kotlin
+ val dateFormat = "yyyy-MM-dd"
+ val sdf = SimpleDateFormat(dateFormat, Locale.US)
+ val eStartDate = Calendar.getInstance()
+ try {
+ sdf.parse(startDate)?.let {
+ eStartDate.time = it
+ }
+ }
+```
+
+
+
+
+### Exporting Constants
+
+A native module can export constants by implementing the native method `getConstants()`, which is available in JS. Below you will implement `getConstants()` and return a Map that contains a `DEFAULT_EVENT_NAME` constant you can access in JavaScript:
+
+
+
+
+```java
+@Override
+public Map getConstants() {
+ final Map constants = new HashMap<>();
+ constants.put("DEFAULT_EVENT_NAME", "New Event");
+ return constants;
+}
+```
+
+
+
+
+```kotlin
+override fun getConstants(): MutableMap =
+ hashMapOf("DEFAULT_EVENT_NAME" to "New Event")
+```
+
+
+
+
+The constant can then be accessed by invoking `getConstants` on the native module in JS:
+
+```tsx
+const {DEFAULT_EVENT_NAME} = CalendarModule.getConstants();
+console.log(DEFAULT_EVENT_NAME);
+```
+
+Technically it is possible to access constants exported in `getConstants()` directly off the native module object. This will no longer be supported with TurboModules, so we encourage the community to switch to the above approach to avoid necessary migration down the line.
+
+:::note
+That currently constants are exported only at initialization time, so if you change getConstants values at runtime it won't affect the JavaScript environment. This will change with Turbomodules. With Turbomodules, `getConstants()` will become a regular native module method, and each invocation will hit the native side.
+:::
+
+### Callbacks
+
+Native modules also support a unique kind of argument: a callback. Callbacks are used to pass data from Java/Kotlin to JavaScript for asynchronous methods. They can also be used to asynchronously execute JavaScript from the native side.
+
+In order to create a native module method with a callback, first import the `Callback` interface, and then add a new parameter to your native module method of type `Callback`. There are a couple of nuances with callback arguments that will soon be lifted with TurboModules. First off, you can only have two callbacks in your function arguments- a successCallback and a failureCallback. In addition, the last argument to a native module method call, if it's a function, is treated as the successCallback, and the second to last argument to a native module method call, if it's a function, is treated as the failure callback.
+
+
+
+
+```java
+import com.facebook.react.bridge.Callback;
+
+@ReactMethod
+public void createCalendarEvent(String name, String location, Callback callBack) {
+}
+```
+
+
+
+
+```kotlin
+import com.facebook.react.bridge.Callback
+
+@ReactMethod fun createCalendarEvent(name: String, location: String, callback: Callback) {}
+```
+
+
+
+
+You can invoke the callback in your Java/Kotlin method, providing whatever data you want to pass to JavaScript. Please note that you can only pass serializable data from native code to JavaScript. If you need to pass back a native object you can use `WriteableMaps`, if you need to use a collection use `WritableArrays`. It is also important to highlight that the callback is not invoked immediately after the native function completes. Below the ID of an event created in an earlier call is passed to the callback.
+
+
+
+
+```java
+ @ReactMethod
+ public void createCalendarEvent(String name, String location, Callback callBack) {
+ Integer eventId = ...
+ callBack.invoke(eventId);
+ }
+```
+
+
+
+
+```kotlin
+ @ReactMethod
+ fun createCalendarEvent(name: String, location: String, callback: Callback) {
+ val eventId = ...
+ callback.invoke(eventId)
+ }
+```
+
+
+
+
+This method could then be accessed in JavaScript using:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEvent(
+ 'Party',
+ 'My House',
+ eventId => {
+ console.log(`Created a new event with id ${eventId}`);
+ },
+ );
+};
+```
+
+Another important detail to note is that a native module method can only invoke one callback, one time. This means that you can either call a success callback or a failure callback, but not both, and each callback can only be invoked at most one time. A native module can, however, store the callback and invoke it later.
+
+There are two approaches to error handling with callbacks. The first is to follow Node’s convention and treat the first argument passed to the callback as an error object.
+
+
+
+
+```java
+ @ReactMethod
+ public void createCalendarEvent(String name, String location, Callback callBack) {
+ Integer eventId = ...
+ callBack.invoke(null, eventId);
+ }
+```
+
+
+
+
+```kotlin
+ @ReactMethod
+ fun createCalendarEvent(name: String, location: String, callback: Callback) {
+ val eventId = ...
+ callback.invoke(null, eventId)
+ }
+```
+
+
+
+
+In JavaScript, you can then check the first argument to see if an error was passed through:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEvent(
+ 'testName',
+ 'testLocation',
+ (error, eventId) => {
+ if (error) {
+ console.error(`Error found! ${error}`);
+ }
+ console.log(`event id ${eventId} returned`);
+ },
+ );
+};
+```
+
+Another option is to use an onSuccess and onFailure callback:
+
+
+
+
+```java
+@ReactMethod
+public void createCalendarEvent(String name, String location, Callback myFailureCallback, Callback mySuccessCallback) {
+}
+```
+
+
+
+
+```kotlin
+@ReactMethod
+ fun createCalendarEvent(
+ name: String,
+ location: String,
+ myFailureCallback: Callback,
+ mySuccessCallback: Callback
+ ) {}
+```
+
+
+
+
+Then in JavaScript you can add a separate callback for error and success responses:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEvent(
+ 'testName',
+ 'testLocation',
+ error => {
+ console.error(`Error found! ${error}`);
+ },
+ eventId => {
+ console.log(`event id ${eventId} returned`);
+ },
+ );
+};
+```
+
+### Promises
+
+Native modules can also fulfill a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise), which can simplify your JavaScript, especially when using ES2016's [async/await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) syntax. When the last parameter of a native module Java/Kotlin method is a Promise, its corresponding JS method will return a JS Promise object.
+
+Refactoring the above code to use a promise instead of callbacks looks like this:
+
+
+
+
+```java
+import com.facebook.react.bridge.Promise;
+
+@ReactMethod
+public void createCalendarEvent(String name, String location, Promise promise) {
+ try {
+ Integer eventId = ...
+ promise.resolve(eventId);
+ } catch(Exception e) {
+ promise.reject("Create Event Error", e);
+ }
+}
+```
+
+
+
+
+```kotlin
+import com.facebook.react.bridge.Promise
+
+@ReactMethod
+fun createCalendarEvent(name: String, location: String, promise: Promise) {
+ try {
+ val eventId = ...
+ promise.resolve(eventId)
+ } catch (e: Throwable) {
+ promise.reject("Create Event Error", e)
+ }
+}
+```
+
+
+
+
+:::note
+Similar to callbacks, a native module method can either reject or resolve a promise (but not both) and can do so at most once. This means that you can either call a success callback or a failure callback, but not both, and each callback can only be invoked at most one time. A native module can, however, store the callback and invoke it later.
+:::
+
+The JavaScript counterpart of this method returns a Promise. This means you can use the `await` keyword within an async function to call it and wait for its result:
+
+```tsx
+const onSubmit = async () => {
+ try {
+ const eventId = await CalendarModule.createCalendarEvent(
+ 'Party',
+ 'My House',
+ );
+ console.log(`Created a new event with id ${eventId}`);
+ } catch (e) {
+ console.error(e);
+ }
+};
+```
+
+The reject method takes different combinations of the following arguments:
+
+
+
+
+```java
+String code, String message, WritableMap userInfo, Throwable throwable
+```
+
+
+
+
+```kotlin
+code: String, message: String, userInfo: WritableMap, throwable: Throwable
+```
+
+
+
+
+For more detail, you can find the `Promise.java` interface [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/Promise.kt). If `userInfo` is not provided, ReactNative will set it to null. For the rest of the parameters React Native will use a default value. The `message` argument provides the error `message` shown at the top of an error call stack. Below is an example of the error message shown in JavaScript from the following reject call in Java/Kotlin.
+
+Java/Kotlin reject call:
+
+
+
+
+```java
+promise.reject("Create Event error", "Error parsing date", e);
+```
+
+
+
+
+```kotlin
+promise.reject("Create Event error", "Error parsing date", e)
+```
+
+
+
+
+Error message in React Native App when promise is rejected:
+
+
+
+ Image of error message
+
+
+### Sending Events to JavaScript
+
+Native modules can signal events to JavaScript without being invoked directly. For example, you might want to signal to JavaScript a reminder that a calendar event from the native Android calendar app will occur soon. The easiest way to do this is to use the `RCTDeviceEventEmitter` which can be obtained from the `ReactContext` as in the code snippet below.
+
+
+
+
+```java
+...
+import com.facebook.react.modules.core.DeviceEventManagerModule;
+import com.facebook.react.bridge.WritableMap;
+import com.facebook.react.bridge.Arguments;
+...
+private void sendEvent(ReactContext reactContext,
+ String eventName,
+ @Nullable WritableMap params) {
+ reactContext
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
+ .emit(eventName, params);
+}
+
+private int listenerCount = 0;
+
+@ReactMethod
+public void addListener(String eventName) {
+ if (listenerCount == 0) {
+ // Set up any upstream listeners or background tasks as necessary
+ }
+
+ listenerCount += 1;
+}
+
+@ReactMethod
+public void removeListeners(Integer count) {
+ listenerCount -= count;
+ if (listenerCount == 0) {
+ // Remove upstream listeners, stop unnecessary background tasks
+ }
+}
+...
+WritableMap params = Arguments.createMap();
+params.putString("eventProperty", "someValue");
+...
+sendEvent(reactContext, "EventReminder", params);
+```
+
+
+
+
+```kotlin
+...
+import com.facebook.react.bridge.WritableMap
+import com.facebook.react.bridge.Arguments
+import com.facebook.react.modules.core.DeviceEventManagerModule
+...
+
+private fun sendEvent(reactContext: ReactContext, eventName: String, params: WritableMap?) {
+ reactContext
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
+ .emit(eventName, params)
+}
+
+private var listenerCount = 0
+
+@ReactMethod
+fun addListener(eventName: String) {
+ if (listenerCount == 0) {
+ // Set up any upstream listeners or background tasks as necessary
+ }
+
+ listenerCount += 1
+}
+
+@ReactMethod
+fun removeListeners(count: Int) {
+ listenerCount -= count
+ if (listenerCount == 0) {
+ // Remove upstream listeners, stop unnecessary background tasks
+ }
+}
+...
+val params = Arguments.createMap().apply {
+ putString("eventProperty", "someValue")
+}
+...
+sendEvent(reactContext, "EventReminder", params)
+```
+
+
+
+
+JavaScript modules can then register to receive events by `addListener` on the [NativeEventEmitter](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/EventEmitter/NativeEventEmitter.js) class.
+
+```tsx
+import {NativeEventEmitter, NativeModules} from 'react-native';
+...
+useEffect(() => {
+ const eventEmitter = new NativeEventEmitter(NativeModules.ToastExample);
+ let eventListener = eventEmitter.addListener('EventReminder', event => {
+ console.log(event.eventProperty) // "someValue"
+ });
+
+ // Removes the listener once unmounted
+ return () => {
+ eventListener.remove();
+ };
+ }, []);
+```
+
+### Getting Activity Result from startActivityForResult
+
+You'll need to listen to `onActivityResult` if you want to get results from an activity you started with `startActivityForResult`. To do this, you must extend `BaseActivityEventListener` or implement `ActivityEventListener`. The former is preferred as it is more resilient to API changes. Then, you need to register the listener in the module's constructor like so:
+
+
+
+
+```java
+reactContext.addActivityEventListener(mActivityResultListener);
+```
+
+
+
+
+```kotlin
+reactContext.addActivityEventListener(mActivityResultListener);
+```
+
+
+
+
+Now you can listen to `onActivityResult` by implementing the following method:
+
+
+
+
+```java
+@Override
+public void onActivityResult(
+ final Activity activity,
+ final int requestCode,
+ final int resultCode,
+ final Intent intent) {
+ // Your logic here
+}
+```
+
+
+
+
+```kotlin
+override fun onActivityResult(
+ activity: Activity?,
+ requestCode: Int,
+ resultCode: Int,
+ intent: Intent?
+) {
+ // Your logic here
+}
+```
+
+
+
+
+Let's implement a basic image picker to demonstrate this. The image picker will expose the method `pickImage` to JavaScript, which will return the path of the image when called.
+
+
+
+
+```kotlin
+public class ImagePickerModule extends ReactContextBaseJavaModule {
+
+ private static final int IMAGE_PICKER_REQUEST = 1;
+ private static final String E_ACTIVITY_DOES_NOT_EXIST = "E_ACTIVITY_DOES_NOT_EXIST";
+ private static final String E_PICKER_CANCELLED = "E_PICKER_CANCELLED";
+ private static final String E_FAILED_TO_SHOW_PICKER = "E_FAILED_TO_SHOW_PICKER";
+ private static final String E_NO_IMAGE_DATA_FOUND = "E_NO_IMAGE_DATA_FOUND";
+
+ private Promise mPickerPromise;
+
+ private final ActivityEventListener mActivityEventListener = new BaseActivityEventListener() {
+
+ @Override
+ public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent intent) {
+ if (requestCode == IMAGE_PICKER_REQUEST) {
+ if (mPickerPromise != null) {
+ if (resultCode == Activity.RESULT_CANCELED) {
+ mPickerPromise.reject(E_PICKER_CANCELLED, "Image picker was cancelled");
+ } else if (resultCode == Activity.RESULT_OK) {
+ Uri uri = intent.getData();
+
+ if (uri == null) {
+ mPickerPromise.reject(E_NO_IMAGE_DATA_FOUND, "No image data found");
+ } else {
+ mPickerPromise.resolve(uri.toString());
+ }
+ }
+
+ mPickerPromise = null;
+ }
+ }
+ }
+ };
+
+ ImagePickerModule(ReactApplicationContext reactContext) {
+ super(reactContext);
+
+ // Add the listener for `onActivityResult`
+ reactContext.addActivityEventListener(mActivityEventListener);
+ }
+
+ @Override
+ public String getName() {
+ return "ImagePickerModule";
+ }
+
+ @ReactMethod
+ public void pickImage(final Promise promise) {
+ Activity currentActivity = getCurrentActivity();
+
+ if (currentActivity == null) {
+ promise.reject(E_ACTIVITY_DOES_NOT_EXIST, "Activity doesn't exist");
+ return;
+ }
+
+ // Store the promise to resolve/reject when picker returns data
+ mPickerPromise = promise;
+
+ try {
+ final Intent galleryIntent = new Intent(Intent.ACTION_PICK);
+
+ galleryIntent.setType("image/*");
+
+ final Intent chooserIntent = Intent.createChooser(galleryIntent, "Pick an image");
+
+ currentActivity.startActivityForResult(chooserIntent, IMAGE_PICKER_REQUEST);
+ } catch (Exception e) {
+ mPickerPromise.reject(E_FAILED_TO_SHOW_PICKER, e);
+ mPickerPromise = null;
+ }
+ }
+}
+```
+
+
+
+
+```kotlin
+class ImagePickerModule(reactContext: ReactApplicationContext) :
+ ReactContextBaseJavaModule(reactContext) {
+
+ private var pickerPromise: Promise? = null
+
+ private val activityEventListener =
+ object : BaseActivityEventListener() {
+ override fun onActivityResult(
+ activity: Activity?,
+ requestCode: Int,
+ resultCode: Int,
+ intent: Intent?
+ ) {
+ if (requestCode == IMAGE_PICKER_REQUEST) {
+ pickerPromise?.let { promise ->
+ when (resultCode) {
+ Activity.RESULT_CANCELED ->
+ promise.reject(E_PICKER_CANCELLED, "Image picker was cancelled")
+ Activity.RESULT_OK -> {
+ val uri = intent?.data
+
+ uri?.let { promise.resolve(uri.toString())}
+ ?: promise.reject(E_NO_IMAGE_DATA_FOUND, "No image data found")
+ }
+ }
+
+ pickerPromise = null
+ }
+ }
+ }
+ }
+
+ init {
+ reactContext.addActivityEventListener(activityEventListener)
+ }
+
+ override fun getName() = "ImagePickerModule"
+
+ @ReactMethod
+ fun pickImage(promise: Promise) {
+ val activity = currentActivity
+
+ if (activity == null) {
+ promise.reject(E_ACTIVITY_DOES_NOT_EXIST, "Activity doesn't exist")
+ return
+ }
+
+ pickerPromise = promise
+
+ try {
+ val galleryIntent = Intent(Intent.ACTION_PICK).apply { type = "image\/*" }
+
+ val chooserIntent = Intent.createChooser(galleryIntent, "Pick an image")
+
+ activity.startActivityForResult(chooserIntent, IMAGE_PICKER_REQUEST)
+ } catch (t: Throwable) {
+ pickerPromise?.reject(E_FAILED_TO_SHOW_PICKER, t)
+ pickerPromise = null
+ }
+ }
+
+ companion object {
+ const val IMAGE_PICKER_REQUEST = 1
+ const val E_ACTIVITY_DOES_NOT_EXIST = "E_ACTIVITY_DOES_NOT_EXIST"
+ const val E_PICKER_CANCELLED = "E_PICKER_CANCELLED"
+ const val E_FAILED_TO_SHOW_PICKER = "E_FAILED_TO_SHOW_PICKER"
+ const val E_NO_IMAGE_DATA_FOUND = "E_NO_IMAGE_DATA_FOUND"
+ }
+}
+```
+
+
+
+
+### Listening to Lifecycle Events
+
+Listening to the activity's LifeCycle events such as `onResume`, `onPause` etc. is very similar to how `ActivityEventListener` was implemented. The module must implement `LifecycleEventListener`. Then, you need to register a listener in the module's constructor like so:
+
+
+
+
+```java
+reactContext.addLifecycleEventListener(this);
+```
+
+
+
+
+```kotlin
+reactContext.addLifecycleEventListener(this)
+```
+
+
+
+
+Now you can listen to the activity's LifeCycle events by implementing the following methods:
+
+
+
+
+```java
+@Override
+public void onHostResume() {
+ // Activity `onResume`
+}
+@Override
+public void onHostPause() {
+ // Activity `onPause`
+}
+@Override
+public void onHostDestroy() {
+ // Activity `onDestroy`
+}
+```
+
+
+
+
+```kotlin
+override fun onHostResume() {
+ // Activity `onResume`
+}
+
+override fun onHostPause() {
+ // Activity `onPause`
+}
+
+override fun onHostDestroy() {
+ // Activity `onDestroy`
+}
+```
+
+
+
+
+### Threading
+
+To date, on Android, all native module async methods execute on one thread. Native modules should not have any assumptions about what thread they are being called on, as the current assignment is subject to change in the future. If a blocking call is required, the heavy work should be dispatched to an internally managed worker thread, and any callbacks distributed from there.
diff --git a/website/versioned_docs/version-0.86/legacy/native-modules-intro.md b/website/versioned_docs/version-0.86/legacy/native-modules-intro.md
new file mode 100644
index 00000000000..f786fe9c5f2
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/native-modules-intro.md
@@ -0,0 +1,30 @@
+---
+id: native-modules-intro
+title: Native Modules Intro
+---
+
+import NativeDeprecated from '../the-new-architecture/\_markdown_native_deprecation.mdx'
+
+
+
+Sometimes a React Native app needs to access a native platform API that is not available by default in JavaScript, for example the native APIs to access Apple or Google Pay. Maybe you want to reuse some existing Objective-C, Swift, Java or C++ libraries without having to reimplement it in JavaScript, or write some high performance, multi-threaded code for things like image processing.
+
+The NativeModule system exposes instances of Java/Objective-C/C++ (native) classes to JavaScript (JS) as JS objects, thereby allowing you to execute arbitrary native code from within JS. While we don't expect this feature to be part of the usual development process, it is essential that it exists. If React Native doesn't export a native API that your JS app needs you should be able to export it yourself!
+
+## Native Module Setup
+
+There are different ways to write a native module for your React Native application:
+
+1. Creating a local library that can be imported in your React Native application. Read [Creating local libraries](local-library-setup) guide to learn more.
+2. Directly within your React Native application's iOS/Android projects
+3. As an NPM package that can be installed as a dependency by your/other React Native applications.
+
+This guide will first walk you through implementing a native module directly within a React Native application. However the native module you build in the following guide can be distributed as an NPM package. Check out the [Setting Up a Native Module as an NPM Package](native-modules-setup) guide if you are interested in doing so.
+
+## Getting Started
+
+In the following sections we will walk you through guides on how to build a native module directly within a React Native application. As a prerequisite, you will need a React Native application to work within. You can follow the steps [here](../getting-started) to setup a React Native application if you do not already have one.
+
+Imagine that you want to access the iOS/Android native calendar APIs from JavaScript within a React Native application in order to create calendar events. React Native does not expose a JavaScript API to communicate with the native calendar libraries. However, through native modules, you can write native code that communicates with native calendar APIs. Then you can invoke that native code through JavaScript in your React Native application.
+
+In the following sections you will create such a Calendar native module for both [Android](native-modules-android) and [iOS](native-modules-ios).
diff --git a/website/versioned_docs/version-0.86/legacy/native-modules-ios.md b/website/versioned_docs/version-0.86/legacy/native-modules-ios.md
new file mode 100644
index 00000000000..6c33c64ec75
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/native-modules-ios.md
@@ -0,0 +1,632 @@
+---
+id: native-modules-ios
+title: iOS Native Modules
+---
+
+import NativeDeprecated from '../the-new-architecture/\_markdown_native_deprecation.mdx'
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+
+
+Welcome to Native Modules for iOS. Please start by reading the [Native Modules Intro](native-modules-intro) for an intro to what native modules are.
+
+## Create a Calendar Native Module
+
+In the following guide you will create a native module, `CalendarModule`, that will allow you to access Apple's calendar APIs from JavaScript. By the end you will be able to call `CalendarModule.createCalendarEvent('Dinner Party', 'My House');` from JavaScript, invoking a native method that creates a calendar event.
+
+### Setup
+
+To get started, open up the iOS project within your React Native application in Xcode. You can find your iOS project here within a React Native app:
+
+
+
+ Image of where you can find your iOS project
+
+
+We recommend using Xcode to write your native code. Xcode is built for iOS development, and using it will help you to quickly resolve smaller errors like code syntax.
+
+### Create Custom Native Module Files
+
+The first step is to create our main custom native module header and implementation files. Create a new file called `RCTCalendarModule.h`
+
+
+
+ Image of creating a custom native module file within the same folder as AppDelegate
+
+
+and add the following to it:
+
+```objectivec
+// RCTCalendarModule.h
+#import
+@interface RCTCalendarModule : NSObject
+@end
+
+```
+
+You can use any name that fits the native module you are building. Name the class `RCTCalendarModule` since you are creating a calendar native module. Since ObjC does not have language-level support for namespaces like Java or C++, convention is to prepend the class name with a substring. This could be an abbreviation of your application name or your infra name. RCT, in this example, refers to React.
+
+As you can see below, the CalendarModule class implements the `RCTBridgeModule` protocol. A native module is an Objective-C class that implements the `RCTBridgeModule` protocol.
+
+Next up, let’s start implementing the native module. Create the corresponding implementation file using cocoa touch class in xcode, `RCTCalendarModule.m`, in the same folder and include the following content:
+
+```objectivec
+// RCTCalendarModule.m
+#import "RCTCalendarModule.h"
+
+@implementation RCTCalendarModule
+
+// To export a module named RCTCalendarModule
+RCT_EXPORT_MODULE();
+
+@end
+
+```
+
+### Module Name
+
+For now, your `RCTCalendarModule.m` native module only includes a `RCT_EXPORT_MODULE` macro, which exports and registers the native module class with React Native. The `RCT_EXPORT_MODULE` macro also takes an optional argument that specifies the name that the module will be accessible as in your JavaScript code.
+
+This argument is not a string literal. In the example below `RCT_EXPORT_MODULE(CalendarModuleFoo)` is passed, not `RCT_EXPORT_MODULE("CalendarModuleFoo")`.
+
+```objectivec
+// To export a module named CalendarModuleFoo
+RCT_EXPORT_MODULE(CalendarModuleFoo);
+```
+
+The native module can then be accessed in JS like this:
+
+```tsx
+const {CalendarModuleFoo} = ReactNative.NativeModules;
+```
+
+If you do not specify a name, the JavaScript module name will match the Objective-C class name, with any "RCT" or "RK" prefixes removed.
+
+Let's follow the example below and call `RCT_EXPORT_MODULE` without any arguments. As a result, the module will be exposed to React Native using the name `CalendarModule`, since that is the Objective-C class name, with RCT removed.
+
+```objectivec
+// Without passing in a name this will export the native module name as the Objective-C class name with “RCT” removed
+RCT_EXPORT_MODULE();
+```
+
+The native module can then be accessed in JS like this:
+
+```tsx
+const {CalendarModule} = ReactNative.NativeModules;
+```
+
+### Export a Native Method to JavaScript
+
+React Native will not expose any methods in a native module to JavaScript unless explicitly told to. This can be done using the `RCT_EXPORT_METHOD` macro. Methods written in the `RCT_EXPORT_METHOD` macro are asynchronous and the return type is therefore always void. In order to pass a result from a `RCT_EXPORT_METHOD` method to JavaScript you can use callbacks or emit events (covered below). Let’s go ahead and set up a native method for our `CalendarModule` native module using the `RCT_EXPORT_METHOD` macro. Call it `createCalendarEvent()` and for now have it take in name and location arguments as strings. Argument type options will be covered shortly.
+
+```objectivec
+RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)name location:(NSString *)location)
+{
+}
+```
+
+:::note
+Please note that the `RCT_EXPORT_METHOD` macro will not be necessary with TurboModules unless your method relies on RCT argument conversion (see argument types below). Ultimately, React Native will remove `RCT_EXPORT_MACRO,` so we discourage people from using `RCTConvert`. Instead, you can do the argument conversion within the method body.
+:::
+
+Before you build out the `createCalendarEvent()` method’s functionality, add a console log in the method so you can confirm it has been invoked from JavaScript in your React Native application. Use the `RCTLog` APIs from React. Let’s import that header at the top of your file and then add the log call.
+
+```objectivec
+#import
+RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)name location:(NSString *)location)
+{
+ RCTLogInfo(@"Pretending to create an event %@ at %@", name, location);
+}
+```
+
+### Synchronous Methods
+
+You can use the `RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD` to create a synchronous native method.
+
+```objectivec
+RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getName)
+{
+return [[UIDevice currentDevice] name];
+}
+```
+
+The return type of this method must be of object type (id) and should be serializable to JSON. This means that the hook can only return nil or JSON values (e.g. NSNumber, NSString, NSArray, NSDictionary).
+
+At the moment, we do not recommend using synchronous methods, since calling methods synchronously can have strong performance penalties and introduce threading-related bugs to your native modules. Additionally, please note that if you choose to use `RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD`, your app can no longer use the Google Chrome debugger. This is because synchronous methods require the JS VM to share memory with the app. For the Google Chrome debugger, React Native runs inside the JS VM in Google Chrome, and communicates asynchronously with the mobile devices via WebSockets.
+
+### Test What You Have Built
+
+At this point you have set up the basic scaffolding for your native module in iOS. Test that out by accessing the native module and invoking it’s exported method in JavaScript.
+
+Find a place in your application where you would like to add a call to the native module’s `createCalendarEvent()` method. Below is an example of a component, `NewModuleButton` you can add in your app. You can invoke the native module inside `NewModuleButton`'s `onPress()` function.
+
+```tsx
+import React from 'react';
+import {Button} from 'react-native';
+
+const NewModuleButton = () => {
+ const onPress = () => {
+ console.log('We will invoke the native module here!');
+ };
+
+ return (
+
+ );
+};
+
+export default NewModuleButton;
+```
+
+In order to access your native module from JavaScript you need to first import `NativeModules` from React Native:
+
+```tsx
+import {NativeModules} from 'react-native';
+```
+
+You can then access the `CalendarModule` native module off of `NativeModules`.
+
+```tsx
+const {CalendarModule} = NativeModules;
+```
+
+Now that you have the CalendarModule native module available, you can invoke your native method `createCalendarEvent()`. Below it is added to the `onPress()` method in `NewModuleButton`:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEvent('testName', 'testLocation');
+};
+```
+
+The final step is to rebuild the React Native app so that you can have the latest native code (with your new native module!) available. In your command line, where the react native application is located, run the following :
+
+
+
+
+```shell
+npm run ios
+```
+
+
+
+
+```shell
+yarn ios
+```
+
+
+
+
+### Building as You Iterate
+
+As you work through these guides and iterate on your native module, you will need to do a native rebuild of your application to access your most recent changes from JavaScript. This is because the code that you are writing sits within the native part of your application. While React Native’s metro bundler can watch for changes in JavaScript and rebuild JS bundle on the fly for you, it will not do so for native code. So if you want to test your latest native changes you need to rebuild by using the above command.
+
+### Recap✨
+
+You should now be able to invoke your `createCalendarEvent()` method on your native module in JavaScript. Since you are using `RCTLog` in the function, you can confirm your native method is being invoked by [enabling debug mode in your app](https://reactnative.dev/docs/debugging#chrome-developer-tools) and looking at the JS console in Chrome or the mobile app debugger Flipper. You should see your `RCTLogInfo(@"Pretending to create an event %@ at %@", name, location);` message each time you invoke the native module method.
+
+
+
+ Image of iOS logs in Flipper
+
+
+At this point you have created an iOS native module and invoked a method on it from JavaScript in your React Native application. You can read on to learn more about things like what argument types your native module method takes and how to setup callbacks and promises within your native module.
+
+## Beyond a Calendar Native Module
+
+### Better Native Module Export
+
+Importing your native module by pulling it off of `NativeModules` like above is a bit clunky.
+
+To save consumers of your native module from needing to do that each time they want to access your native module, you can create a JavaScript wrapper for the module. Create a new JavaScript file named NativeCalendarModule.js with the following content:
+
+```tsx
+/**
+* This exposes the native CalendarModule module as a JS module. This has a
+* function 'createCalendarEvent' which takes the following parameters:
+
+* 1. String name: A string representing the name of the event
+* 2. String location: A string representing the location of the event
+*/
+import {NativeModules} from 'react-native';
+const {CalendarModule} = NativeModules;
+export default CalendarModule;
+```
+
+This JavaScript file also becomes a good location for you to add any JavaScript side functionality. For example, if you use a type system like TypeScript you can add type annotations for your native module here. While React Native does not yet support Native to JS type safety, with these type annotations, all your JS code will be type safe. These annotations will also make it easier for you to switch to type-safe native modules down the line. Below is an example of adding type safety to the Calendar Module:
+
+```tsx
+/**
+ * This exposes the native CalendarModule module as a JS module. This has a
+ * function 'createCalendarEvent' which takes the following parameters:
+ *
+ * 1. String name: A string representing the name of the event
+ * 2. String location: A string representing the location of the event
+ */
+import {NativeModules} from 'react-native';
+const {CalendarModule} = NativeModules;
+interface CalendarInterface {
+ createCalendarEvent(name: string, location: string): void;
+}
+export default CalendarModule as CalendarInterface;
+```
+
+In your other JavaScript files you can access the native module and invoke its method like this:
+
+```tsx
+import NativeCalendarModule from './NativeCalendarModule';
+NativeCalendarModule.createCalendarEvent('foo', 'bar');
+```
+
+:::note
+This assumes that the place you are importing `CalendarModule` is in the same hierarchy as `NativeCalendarModule.js`. Please update the relative import as necessary.
+:::
+
+### Argument Types
+
+When a native module method is invoked in JavaScript, React Native converts the arguments from JS objects to their Objective-C/Swift object analogues. So for example, if your Objective-C Native Module method accepts a NSNumber, in JS you need to call the method with a number. React Native will handle the conversion for you. Below is a list of the argument types supported for native module methods and the JavaScript equivalents they map to.
+
+| Objective-C | JavaScript |
+| --------------------------------------------- | ------------------ |
+| NSString | string, ?string |
+| BOOL | boolean |
+| double | number |
+| NSNumber | ?number |
+| NSArray | Array, ?Array |
+| NSDictionary | Object, ?Object |
+| RCTResponseSenderBlock | Function (success) |
+| RCTResponseSenderBlock, RCTResponseErrorBlock | Function (failure) |
+| RCTPromiseResolveBlock, RCTPromiseRejectBlock | Promise |
+
+:::info
+The following types are currently supported but will not be supported in TurboModules. Please avoid using them.
+
+- Function (failure) -> RCTResponseErrorBlock
+- Number -> NSInteger
+- Number -> CGFloat
+- Number -> float
+ :::
+
+For iOS, you can also write native module methods with any argument type that is supported by the `RCTConvert` class (see [RCTConvert](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Base/RCTConvert.h) for details about what is supported). The RCTConvert helper functions all accept a JSON value as input and map it to a native Objective-C type or class.
+
+### Exporting Constants
+
+A native module can export constants by overriding the native method `constantsToExport()`. Below `constantsToExport()` is overridden, and returns a Dictionary that contains a default event name property you can access in JavaScript like so:
+
+```objectivec
+- (NSDictionary *)constantsToExport
+{
+ return @{ @"DEFAULT_EVENT_NAME": @"New Event" };
+}
+```
+
+The constant can then be accessed by invoking `getConstants()` on the native module in JS like so:
+
+```tsx
+const {DEFAULT_EVENT_NAME} = CalendarModule.getConstants();
+console.log(DEFAULT_EVENT_NAME);
+```
+
+Technically, it is possible to access constants exported in `constantsToExport()` directly off the `NativeModule` object. This will no longer be supported with TurboModules, so we encourage the community to switch to the above approach to avoid necessary migration down the line.
+
+:::note
+The constants are exported only at initialization time, so if you change `constantsToExport()` values at runtime it won't affect the JavaScript environment.
+:::
+
+For iOS, if you override `constantsToExport()` then you should also implement `+ requiresMainQueueSetup` to let React Native know if your module needs to be initialized on the main thread, before any JavaScript code executes. Otherwise you will see a warning that in the future your module may be initialized on a background thread unless you explicitly opt out with `+ requiresMainQueueSetup:`. If your module does not require access to UIKit, then you should respond to `+ requiresMainQueueSetup` with NO.
+
+### Callbacks
+
+Native modules also support a unique kind of argument - a callback. Callbacks are used to pass data from Objective-C to JavaScript for asynchronous methods. They can also be used to asynchronously execute JS from the native side.
+
+For iOS, callbacks are implemented using the type `RCTResponseSenderBlock`. Below the callback parameter `myCallBack` is added to the `createCalendarEventMethod()`:
+
+```objectivec
+RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)title
+ location:(NSString *)location
+ myCallback:(RCTResponseSenderBlock)callback)
+
+```
+
+You can then invoke the callback in your native function, providing whatever result you want to pass to JavaScript in an array. Note that `RCTResponseSenderBlock` accepts only one argument - an array of parameters to pass to the JavaScript callback. Below you will pass back the ID of an event created in an earlier call.
+
+:::info
+It is important to highlight that the callback is not invoked immediately after the native function completes—remember the communication is asynchronous.
+:::
+
+```objectivec
+RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)title location:(NSString *)location callback: (RCTResponseSenderBlock)callback)
+{
+ NSInteger eventId = ...
+ callback(@[@(eventId)]);
+
+ RCTLogInfo(@"Pretending to create an event %@ at %@", title, location);
+}
+
+```
+
+This method could then be accessed in JavaScript using the following:
+
+```tsx
+const onSubmit = () => {
+ CalendarModule.createCalendarEvent(
+ 'Party',
+ '04-12-2020',
+ eventId => {
+ console.log(`Created a new event with id ${eventId}`);
+ },
+ );
+};
+```
+
+A native module is supposed to invoke its callback only once. It can, however, store the callback and invoke it later. This pattern is often used to wrap iOS APIs that require delegates— see [`RCTAlertManager`](https://github.com/facebook/react-native/blob/main/packages/react-native/React/CoreModules/RCTAlertManager.mm) for an example. If the callback is never invoked, some memory is leaked.
+
+There are two approaches to error handling with callbacks. The first is to follow Node’s convention and treat the first argument passed to the callback array as an error object.
+
+```objectivec
+RCT_EXPORT_METHOD(createCalendarEventCallback:(NSString *)title location:(NSString *)location callback: (RCTResponseSenderBlock)callback)
+{
+ NSNumber *eventId = [NSNumber numberWithInt:123];
+ callback(@[[NSNull null], eventId]);
+}
+```
+
+In JavaScript, you can then check the first argument to see if an error was passed through:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEventCallback(
+ 'testName',
+ 'testLocation',
+ (error, eventId) => {
+ if (error) {
+ console.error(`Error found! ${error}`);
+ }
+ console.log(`event id ${eventId} returned`);
+ },
+ );
+};
+```
+
+Another option is to use two separate callbacks: onFailure and onSuccess.
+
+```objectivec
+RCT_EXPORT_METHOD(createCalendarEventCallback:(NSString *)title
+ location:(NSString *)location
+ errorCallback: (RCTResponseSenderBlock)errorCallback
+ successCallback: (RCTResponseSenderBlock)successCallback)
+{
+ @try {
+ NSNumber *eventId = [NSNumber numberWithInt:123];
+ successCallback(@[eventId]);
+ }
+
+ @catch ( NSException *e ) {
+ errorCallback(@[e]);
+ }
+}
+```
+
+Then in JavaScript you can add a separate callback for error and success responses:
+
+```tsx
+const onPress = () => {
+ CalendarModule.createCalendarEventCallback(
+ 'testName',
+ 'testLocation',
+ error => {
+ console.error(`Error found! ${error}`);
+ },
+ eventId => {
+ console.log(`event id ${eventId} returned`);
+ },
+ );
+};
+```
+
+If you want to pass error-like objects to JavaScript, use `RCTMakeError` from [`RCTUtils.h.`](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Base/RCTUtils.h) Right now this only passes an Error-shaped dictionary to JavaScript, but React Native aims to automatically generate real JavaScript Error objects in the future. You can also provide a `RCTResponseErrorBlock` argument, which is used for error callbacks and accepts an `NSError \* object`. Please note that this argument type will not be supported with TurboModules.
+
+### Promises
+
+Native modules can also fulfill a promise, which can simplify your JavaScript, especially when using ES2016's `async/await` syntax. When the last parameter of a native module method is a `RCTPromiseResolveBlock` and `RCTPromiseRejectBlock`, its corresponding JS method will return a JS Promise object.
+
+Refactoring the above code to use a promise instead of callbacks looks like this:
+
+```objectivec
+RCT_EXPORT_METHOD(createCalendarEvent:(NSString *)title
+ location:(NSString *)location
+ resolver:(RCTPromiseResolveBlock)resolve
+ rejecter:(RCTPromiseRejectBlock)reject)
+{
+ NSInteger eventId = createCalendarEvent();
+ if (eventId) {
+ resolve(@(eventId));
+ } else {
+ reject(@"event_failure", @"no event id returned", nil);
+ }
+}
+
+```
+
+The JavaScript counterpart of this method returns a Promise. This means you can use the `await` keyword within an async function to call it and wait for its result:
+
+```tsx
+const onSubmit = async () => {
+ try {
+ const eventId = await CalendarModule.createCalendarEvent(
+ 'Party',
+ 'my house',
+ );
+ console.log(`Created a new event with id ${eventId}`);
+ } catch (e) {
+ console.error(e);
+ }
+};
+```
+
+### Sending Events to JavaScript
+
+Native modules can signal events to JavaScript without being invoked directly. For example, you might want to signal to JavaScript a reminder that a calendar event from the native iOS calendar app will occur soon. The preferred way to do this is to subclass `RCTEventEmitter`, implement `supportedEvents` and call self `sendEventWithName`:
+
+Update your header class to import `RCTEventEmitter` and subclass `RCTEventEmitter`:
+
+```objectivec
+// CalendarModule.h
+
+#import
+#import
+
+@interface CalendarModule : RCTEventEmitter
+@end
+
+```
+
+JavaScript code can subscribe to these events by creating a new `NativeEventEmitter` instance around your module.
+
+You will receive a warning if you expend resources unnecessarily by emitting an event while there are no listeners. To avoid this, and to optimize your module's workload (e.g. by unsubscribing from upstream notifications or pausing background tasks), you can override `startObserving` and `stopObserving` in your `RCTEventEmitter` subclass.
+
+```objectivec
+@implementation CalendarModule
+{
+ bool hasListeners;
+}
+
+// Will be called when this module's first listener is added.
+-(void)startObserving {
+ hasListeners = YES;
+ // Set up any upstream listeners or background tasks as necessary
+}
+
+// Will be called when this module's last listener is removed, or on dealloc.
+-(void)stopObserving {
+ hasListeners = NO;
+ // Remove upstream listeners, stop unnecessary background tasks
+}
+
+- (void)calendarEventReminderReceived:(NSNotification *)notification
+{
+ NSString *eventName = notification.userInfo[@"name"];
+ if (hasListeners) {// Only send events if anyone is listening
+ [self sendEventWithName:@"EventReminder" body:@{@"name": eventName}];
+ }
+}
+
+```
+
+### Threading
+
+Unless the native module provides its own method queue, it shouldn't make any assumptions about what thread it's being called on. Currently, if a native module doesn't provide a method queue, React Native will create a separate GCD queue for it and invoke its methods there. Please note that this is an implementation detail and might change. If you want to explicitly provide a method queue for a native module, override the `(dispatch_queue_t) methodQueue` method in the native module. For example, if it needs to use a main-thread-only iOS API, it should specify this via:
+
+```objectivec
+- (dispatch_queue_t)methodQueue
+{
+ return dispatch_get_main_queue();
+}
+```
+
+Similarly, if an operation may take a long time to complete, the native module can specify its own queue to run operations on. Again, currently React Native will provide a separate method queue for your native module, but this is an implementation detail you should not rely on. If you don't provide your own method queue, in the future, your native module's long running operations may end up blocking async calls being executed on other unrelated native modules. The `RCTAsyncLocalStorage` module here, for example, creates its own queue so the React queue isn't blocked waiting on potentially slow disk access.
+
+```objectivec
+- (dispatch_queue_t)methodQueue
+{
+ return dispatch_queue_create("com.facebook.React.AsyncLocalStorageQueue", DISPATCH_QUEUE_SERIAL);
+}
+```
+
+The specified `methodQueue` will be shared by all of the methods in your module. If only one of your methods is long-running (or needs to be run on a different queue than the others for some reason), you can use `dispatch_async` inside the method to perform that particular method's code on another queue, without affecting the others:
+
+```objectivec
+RCT_EXPORT_METHOD(doSomethingExpensive:(NSString *)param callback:(RCTResponseSenderBlock)callback)
+{
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+ // Call long-running code on background thread
+ ...
+ // You can invoke callback from any thread/queue
+ callback(@[...]);
+ });
+}
+
+```
+
+:::info[Sharing dispatch queues between modules]
+The `methodQueue` method will be called once when the module is initialized, and then retained by React Native, so there is no need to keep a reference to the queue yourself, unless you wish to make use of it within your module. However, if you wish to share the same queue between multiple modules then you will need to ensure that you retain and return the same queue instance for each of them.
+:::
+
+### Dependency Injection
+
+React Native will create and initialize any registered native modules automatically. However, you may wish to create and initialize your own module instances to, for example, inject dependencies.
+
+You can do this by creating a class that implements the `RCTBridgeDelegate` Protocol, initializing an `RCTBridge` with the delegate as an argument and initialising a `RCTRootView` with the initialized bridge.
+
+```objectivec
+id moduleInitialiser = [[classThatImplementsRCTBridgeDelegate alloc] init];
+
+RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:moduleInitialiser launchOptions:nil];
+
+RCTRootView *rootView = [[RCTRootView alloc]
+ initWithBridge:bridge
+ moduleName:kModuleName
+ initialProperties:nil];
+```
+
+### Exporting Swift
+
+Swift doesn't have support for macros, so exposing native modules and their methods to JavaScript inside React Native requires a bit more setup. However, it works relatively the same. Let's say you have the same `CalendarModule` but as a Swift class:
+
+```swift
+// CalendarModule.swift
+
+@objc(CalendarModule)
+class CalendarModule: NSObject {
+
+ @objc(addEvent:location:date:)
+ func addEvent(_ name: String, location: String, date: NSNumber) -> Void {
+ // Date is ready to use!
+ }
+
+ @objc
+ func constantsToExport() -> [String: Any]! {
+ return ["someKey": "someValue"]
+ }
+
+}
+```
+
+:::note
+It is important to use the `@objc` modifiers to ensure the class and functions are exported properly to the Objective-C runtime.
+:::
+
+Then create a private implementation file that will register the required information with React Native:
+
+```objectivec
+// CalendarModuleBridge.m
+#import
+
+@interface RCT_EXTERN_MODULE(CalendarModule, NSObject)
+
+RCT_EXTERN_METHOD(addEvent:(NSString *)name location:(NSString *)location date:(nonnull NSNumber *)date)
+
+@end
+```
+
+For those of you new to Swift and Objective-C, whenever you [mix the two languages in an iOS project](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html), you will also need an additional bridging file, known as a bridging header, to expose the Objective-C files to Swift. Xcode will offer to create this header file for you if you add your Swift file to your app through the Xcode `File>New File` menu option. You will need to import `RCTBridgeModule.h` in this header file.
+
+```objectivec
+// CalendarModule-Bridging-Header.h
+#import
+```
+
+You can also use `RCT_EXTERN_REMAP_MODULE` and `_RCT_EXTERN_REMAP_METHOD` to alter the JavaScript name of the module or methods you are exporting. For more information see [`RCTBridgeModule`](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Base/RCTBridgeModule.h).
+
+:::note
+Important when making third party modules: Static libraries with Swift are only supported in Xcode 9 and later. In order for the Xcode project to build when you use Swift in the iOS static library you include in the module, your main app project must contain Swift code and a bridging header itself. If your app project does not contain any Swift code, a workaround can be a single empty .swift file and an empty bridging header.
+:::
+
+### Reserved Method Names
+
+#### invalidate()
+
+Native modules can conform to the [RCTInvalidating](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Base/RCTInvalidating.h) protocol on iOS by implementing the `invalidate()` method. This method [can be invoked](https://github.com/facebook/react-native/blob/0.62-stable/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm#L456) when the native bridge is invalidated (i.e.: on devmode reload). Please use this mechanism as necessary to do the required cleanup for your native module.
diff --git a/website/versioned_docs/version-0.86/legacy/native-modules-setup.md b/website/versioned_docs/version-0.86/legacy/native-modules-setup.md
new file mode 100644
index 00000000000..37c34b65f5b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/legacy/native-modules-setup.md
@@ -0,0 +1,33 @@
+---
+id: native-modules-setup
+title: Native Modules NPM Package Setup
+---
+
+import NativeDeprecated from '../the-new-architecture/\_markdown_native_deprecation.mdx'
+
+
+
+Native modules are usually distributed as npm packages, except that on top of the usual JavaScript they will include some native code per platform. To understand more about npm packages you may find [this guide](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) useful.
+
+To get set up with the basic project structure for a native module we will use the community tool called [create-react-native-library](https://callstack.github.io/react-native-builder-bob/create). You can go ahead further and dive deep into how that library works, but for our needs we will only execute the basic script:
+
+```shell
+npx create-react-native-library@latest react-native-awesome-module
+```
+
+Where `react-native-awesome-module` is the name you would like for the new module. After doing this you will navigate into `react-native-awesome-module` folder and bootstrap the example project by running:
+
+```shell
+yarn
+```
+
+When the bootstrap is done, you will be able to start the example app by executing one of the following commands:
+
+```shell
+# Android app
+yarn example android
+# iOS app
+yarn example ios
+```
+
+When all steps above are done, you will be able to continue with [Android Native Modules](native-modules-android) or [iOS Native Modules](native-modules-ios) guides to add in some code.
diff --git a/website/versioned_docs/version-0.86/libraries.md b/website/versioned_docs/version-0.86/libraries.md
new file mode 100644
index 00000000000..e7565d34631
--- /dev/null
+++ b/website/versioned_docs/version-0.86/libraries.md
@@ -0,0 +1,120 @@
+---
+id: libraries
+title: Using Libraries
+author: Brent Vatne
+authorURL: 'https://twitter.com/notbrent'
+description: This guide introduces React Native developers to finding, installing, and using third-party libraries in their apps.
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+React Native provides a set of built-in [Core Components and APIs](./components-and-apis) ready to use in your app. You're not limited to the components and APIs bundled with React Native. React Native has a community of thousands of developers. If the Core Components and APIs don't have what you are looking for, you may be able to find and install a library from the community to add the functionality to your app.
+
+## Selecting a Package Manager
+
+React Native libraries are typically installed from the [npm registry](https://www.npmjs.com/) using a Node.js package manager such as [npm CLI](https://docs.npmjs.com/cli/npm) or [Yarn Classic](https://classic.yarnpkg.com/en/).
+
+If you have Node.js installed on your computer then you already have the npm CLI installed. Some developers prefer to use Yarn Classic for slightly faster install times and additional advanced features like Workspaces. Both tools work great with React Native. We will assume npm for the rest of this guide for simplicity of explanation.
+
+:::note
+The terms "library" and "package" are used interchangeably in the JavaScript community.
+:::
+
+## Installing a Library
+
+To install a library in your project, navigate to your project directory in your terminal and run the installation command. Let's try this with `react-native-webview`:
+
+
+
+
+```shell
+npm install react-native-webview
+```
+
+
+
+
+```shell
+yarn add react-native-webview
+```
+
+
+
+
+The library that we installed includes native code, and we need to link to our app before we use it.
+
+## Linking Native Code on iOS
+
+React Native uses CocoaPods to manage iOS project dependencies and most React Native libraries follow this same convention. If a library you are using does not, then please refer to their README for additional instruction. In most cases, the following instructions will apply.
+
+Run `pod install` in our `ios` directory in order to link it to our native iOS project. A shortcut for doing this without switching to the `ios` directory is to run `npx pod-install`.
+
+```bash
+npx pod-install
+```
+
+Once this is complete, re-build the app binary to start using your new library:
+
+
+
+
+```shell
+npm run ios
+```
+
+
+
+
+```shell
+yarn ios
+```
+
+
+
+
+## Linking Native Code on Android
+
+React Native uses Gradle to manage Android project dependencies. After you install a library with native dependencies, you will need to re-build the app binary to use your new library:
+
+
+
+
+```shell
+npm run android
+```
+
+
+
+
+```shell
+yarn android
+```
+
+
+
+
+## Finding Libraries
+
+[React Native Directory](https://reactnative.directory) is a searchable database of libraries built specifically for React Native. This is the first place to look for a library for your React Native app.
+
+Many of the libraries you will find on the directory are from [React Native Community](https://github.com/react-native-community/) or [Expo](https://docs.expo.dev/versions/latest/).
+
+Libraries built by the React Native Community are driven by volunteers and individuals at companies that depend on React Native. They often support iOS, tvOS, Android, Windows, but this varies across projects. Many of the libraries in this organization were once React Native Core Components and APIs.
+
+Libraries built by Expo are all written in TypeScript and support iOS, Android, and `react-native-web` wherever possible.
+
+After React Native Directory, the [npm registry](https://www.npmjs.com/) is the next best place if you can't find a library specifically for React Native on the directory. The npm registry is the definitive source for JavaScript libraries, but the libraries that it lists may not all be compatible with React Native. React Native is one of many JavaScript programming environments, including Node.js, web browsers, Electron, and more, and npm includes libraries that work for all of these environments.
+
+## Determining Library Compatibility
+
+### Does it work with React Native?
+
+Usually libraries built _specifically for other platforms_ will not work with React Native. Examples include `react-select` which is built for the web and specifically targets `react-dom`, and `rimraf` which is built for Node.js and interacts with your computer file system. Other libraries like `lodash` use only JavaScript language features and work in any environment. You will gain a sense for this over time, but until then the easiest way to find out is to try it yourself. You can remove packages using `npm uninstall` if it turns out that it does not work in React Native.
+
+### Does it work for the platforms that my app supports?
+
+[React Native Directory](https://reactnative.directory) allows you to filter by platform compatibility, such as iOS, Android, Web, and Windows. If the library you would like to use is not currently listed there, refer to the README for the library to learn more.
+
+### Does it work with my app version of React Native?
+
+The latest version of a library is typically compatible with the latest version of React Native. If you are using an older version, you should refer to the README to know which version of the library you should install. You can install a particular version of the library by running `npm install @`, for example: `npm install @react-native-community/netinfo@^2.0.0`.
diff --git a/website/versioned_docs/version-0.86/linking-libraries-ios.md b/website/versioned_docs/version-0.86/linking-libraries-ios.md
new file mode 100644
index 00000000000..c7d23a5d596
--- /dev/null
+++ b/website/versioned_docs/version-0.86/linking-libraries-ios.md
@@ -0,0 +1,57 @@
+---
+id: linking-libraries-ios
+title: Linking Libraries
+---
+
+Not every app uses all the native capabilities, and including the code to support all those features would impact the binary size... But we still want to support adding these features whenever you need them.
+
+With that in mind we exposed many of these features as independent static libraries.
+
+For most of the libs it will be as quick as dragging two files, sometimes a third step will be necessary, but no more than that.
+
+:::note
+All the libraries we ship with React Native live in the `Libraries` folder in the root of the repository. Some of them are pure JavaScript, and you only need to `require` it.
+Other libraries also rely on some native code, in that case you'll have to add these files to your app, otherwise the app will throw an error as soon as you try to use the library.
+:::
+
+## Here are the few steps to link your libraries that contain native code
+
+### Automatic linking
+
+Install a library with native dependencies:
+
+```shell
+npm install --save
+```
+
+:::info
+`--save` or `--save-dev` flag is very important for this step. React Native will link your libs based on `dependencies` and `devDependencies` in your `package.json` file.
+:::
+
+That's it! Next time you build your app the native code will be linked thanks to the [autolinking](https://github.com/react-native-community/cli/blob/main/docs/autolinking.md) mechanism.
+
+### Manual linking
+
+#### Step 1
+
+If the library has native code, there must be an `.xcodeproj` file inside its folder. Drag this file to your project on Xcode (usually under the `Libraries` group on Xcode);
+
+
+
+#### Step 2
+
+Click on your main project file (the one that represents the `.xcodeproj`) select `Build Phases` and drag the static library from the `Products` folder inside the Library you are importing to `Link Binary With Libraries`
+
+
+
+#### Step 3
+
+Not every library will need this step, what you need to consider is:
+
+_Do I need to know the contents of the library at compile time?_
+
+What that means is, are you using this library on the native side or only in JavaScript? If you are only using it in JavaScript, you are good to go!
+
+If you do need to call it from native, then we need to know the library's headers. To achieve that you have to go to your project's file, select `Build Settings` and search for `Header Search Paths`. There you should include the path to your library. (This documentation used to recommend using `recursive`, but this is no longer recommended, as it can cause subtle build failures, especially with CocoaPods.)
+
+
diff --git a/website/versioned_docs/version-0.86/linking.md b/website/versioned_docs/version-0.86/linking.md
new file mode 100644
index 00000000000..48c0db2f633
--- /dev/null
+++ b/website/versioned_docs/version-0.86/linking.md
@@ -0,0 +1,688 @@
+---
+id: linking
+title: Linking
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+`Linking` gives you a general interface to interact with both incoming and outgoing app links.
+
+Every Link (URL) has a URL Scheme, some websites are prefixed with `https://` or `http://` and the `http` is the URL Scheme. Let's call it scheme for short.
+
+In addition to `https`, you're likely also familiar with the `mailto` scheme. When you open a link with the mailto scheme, your operating system will open an installed mail application. Similarly, there are schemes for making phone calls and sending SMS. Read more about [built-in URL](#built-in-url-schemes) schemes below.
+
+Like using the mailto scheme, it's possible to link to other applications by using custom url schemes. For example, when you get a **Magic Link** email from Slack, the **Launch Slack** button is an anchor tag with an href that looks something like: `slack://secret/magic-login/other-secret`. Like with Slack, you can tell the operating system that you want to handle a custom scheme. When the Slack app opens, it receives the URL that was used to open it. This is often referred to as deep linking. Read more about how to [get the deep link](#get-the-deep-link) into your app.
+
+A custom URL scheme isn't the only way to open your application on mobile. For example, if you want to email someone a link to be opened on mobile, using a custom URL scheme isn't ideal because the user might open the email on a desktop, where the link wouldn't work. Instead, you should use standard `https` links, such as `https://www.myapp.io/records/1234546`. On mobile, these links can be configured to open your app. On Android, this feature is called **Deep Links**, while on iOS, it is known as **Universal Links**.
+
+### Built-in URL Schemes
+
+As mentioned in the introduction, there are some URL schemes for core functionality that exist on every platform. The following is a non-exhaustive list, but covers the most commonly used schemes.
+
+| Scheme | Description | iOS | Android |
+| ---------------- | ------------------------------------------ | --- | ------- |
+| `mailto` | Open mail app, eg: mailto: hello@world.dev | ✅ | ✅ |
+| `tel` | Open phone app, eg: tel:+123456789 | ✅ | ✅ |
+| `sms` | Open SMS app, eg: sms:+123456789 | ✅ | ✅ |
+| `https` / `http` | Open web browser app, eg: https://expo.dev | ✅ | ✅ |
+
+### Enabling Deep Links
+
+
+
Projects with Native Code Only
+
The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on Linking in the Expo documentation for the appropriate alternative.
+
+
+If you want to enable deep links in your app, please read the below guide:
+
+
+
+
+:::info
+For instructions on how to add support for deep linking on Android, refer to [Enabling Deep Links for App Content - Add Intent Filters for Your Deep Links](https://developer.android.com/training/app-indexing/deep-linking.html#adding-filters).
+:::
+
+If you wish to receive the intent in an existing instance of MainActivity, you may set the `launchMode` of MainActivity to `singleTask` in `AndroidManifest.xml`. See [``](https://developer.android.com/guide/topics/manifest/activity-element.html) documentation for more information.
+
+```xml
+
+```
+
+
+
+
+:::note
+On iOS, you'll need to add the `LinkingIOS` folder into your header search paths as described in step 3 [here](linking-libraries-ios#step-3). If you also want to listen to incoming app links during your app's execution, you'll need to add the following lines to your `*AppDelegate.m`:
+
+
+
+
+```objc title="AppDelegate.mm"
+// iOS 9.x or newer
+#import
+
+- (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ options:(NSDictionary *)options
+{
+ return [RCTLinkingManager application:application openURL:url options:options];
+}
+```
+
+If your app is using [Universal Links](https://developer.apple.com/ios/universal-links/), you'll need to add the following code as well:
+
+```objc title="AppDelegate.mm"
+- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
+ restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler
+{
+ return [RCTLinkingManager application:application
+ continueUserActivity:userActivity
+ restorationHandler:restorationHandler];
+}
+```
+
+
+
+
+```swift title="AppDelegate.swift"
+override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
+ return RCTLinkingManager.application(app, open: url, options: options)
+}
+```
+
+If your app is using [Universal Links](https://developer.apple.com/ios/universal-links/), you'll need to add the following code as well:
+
+```swift title="AppDelegate.swift"
+override func application(
+ _ application: UIApplication,
+ continue userActivity: NSUserActivity,
+ restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
+ return RCTLinkingManager.application(
+ application,
+ continue: userActivity,
+ restorationHandler: restorationHandler
+ )
+ }
+```
+
+
+
+
+:::
+
+
+
+
+### Handling Deep Links
+
+There are two ways to handle URLs that open your app.
+
+#### 1. If the app is already open, the app is foregrounded and a Linking 'url' event is fired
+
+You can handle these events with `Linking.addEventListener('url', callback)` - it calls `callback({url})` with the linked URL
+
+#### 2. If the app is not already open, it is opened and the url is passed in as the initialURL
+
+You can handle these events with `Linking.getInitialURL()` - it returns a Promise that resolves to the URL, if there is one.
+
+---
+
+## Example
+
+### Open Links and Deep Links (Universal Links)
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=ios,android&ext=js
+import React, {useCallback} from 'react';
+import {Alert, Button, Linking, StyleSheet, View} from 'react-native';
+
+const supportedURL = 'https://google.com';
+
+const unsupportedURL = 'slack://open?team=123456';
+
+const OpenURLButton = ({url, children}) => {
+ const handlePress = useCallback(async () => {
+ // Checking if the link is supported for links with custom URL scheme.
+ const supported = await Linking.canOpenURL(url);
+
+ if (supported) {
+ // Opening the link with some app, if the URL scheme is "http" the web link should be opened
+ // by some browser in the mobile
+ await Linking.openURL(url);
+ } else {
+ Alert.alert(`Don't know how to open this URL: ${url}`);
+ }
+ }, [url]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+ Open Supported URL
+ Open Unsupported URL
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=ios,android&ext=tsx
+import React, {useCallback} from 'react';
+import {Alert, Button, Linking, StyleSheet, View} from 'react-native';
+
+const supportedURL = 'https://google.com';
+
+const unsupportedURL = 'slack://open?team=123456';
+
+type OpenURLButtonProps = {
+ url: string;
+ children: string;
+};
+
+const OpenURLButton = ({url, children}: OpenURLButtonProps) => {
+ const handlePress = useCallback(async () => {
+ // Checking if the link is supported for links with custom URL scheme.
+ const supported = await Linking.canOpenURL(url);
+
+ if (supported) {
+ // Opening the link with some app, if the URL scheme is "http" the web link should be opened
+ // by some browser in the mobile
+ await Linking.openURL(url);
+ } else {
+ Alert.alert(`Don't know how to open this URL: ${url}`);
+ }
+ }, [url]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+ Open Supported URL
+ Open Unsupported URL
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+### Open Custom Settings
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=ios,android&ext=js
+import React, {useCallback} from 'react';
+import {Button, Linking, StyleSheet, View} from 'react-native';
+
+const OpenSettingsButton = ({children}) => {
+ const handlePress = useCallback(async () => {
+ // Open the custom settings if the app has one
+ await Linking.openSettings();
+ }, []);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+ Open Settings
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=ios,android&ext=tsx
+import React, {useCallback} from 'react';
+import {Button, Linking, StyleSheet, View} from 'react-native';
+
+type OpenSettingsButtonProps = {
+ children: string;
+};
+
+const OpenSettingsButton = ({children}: OpenSettingsButtonProps) => {
+ const handlePress = useCallback(async () => {
+ // Open the custom settings if the app has one
+ await Linking.openSettings();
+ }, []);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+ Open Settings
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+### Get the Deep Link
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=ios,android&ext=js
+import React, {useState, useEffect} from 'react';
+import {Linking, StyleSheet, Text, View} from 'react-native';
+
+const useInitialURL = () => {
+ const [url, setUrl] = useState(null);
+ const [processing, setProcessing] = useState(true);
+
+ useEffect(() => {
+ const getUrlAsync = async () => {
+ // Get the deep link used to open the app
+ const initialUrl = await Linking.getInitialURL();
+
+ // The setTimeout is just for testing purpose
+ setTimeout(() => {
+ setUrl(initialUrl);
+ setProcessing(false);
+ }, 1000);
+ };
+
+ getUrlAsync();
+ }, []);
+
+ return {url, processing};
+};
+
+const App = () => {
+ const {url: initialUrl, processing} = useInitialURL();
+
+ return (
+
+
+ {processing
+ ? 'Processing the initial url from a deep link'
+ : `The deep link is: ${initialUrl || 'None'}`}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=ios,android&ext=tsx
+import React, {useState, useEffect} from 'react';
+import {Linking, StyleSheet, Text, View} from 'react-native';
+
+const useInitialURL = () => {
+ const [url, setUrl] = useState(null);
+ const [processing, setProcessing] = useState(true);
+
+ useEffect(() => {
+ const getUrlAsync = async () => {
+ // Get the deep link used to open the app
+ const initialUrl = await Linking.getInitialURL();
+
+ // The setTimeout is just for testing purpose
+ setTimeout(() => {
+ setUrl(initialUrl);
+ setProcessing(false);
+ }, 1000);
+ };
+
+ getUrlAsync();
+ }, []);
+
+ return {url, processing};
+};
+
+const App = () => {
+ const {url: initialUrl, processing} = useInitialURL();
+
+ return (
+
+
+ {processing
+ ? 'Processing the initial url from a deep link'
+ : `The deep link is: ${initialUrl || 'None'}`}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+### Send Intents (Android)
+
+
+
+
+```SnackPlayer name=Linking%20Example&supportedPlatforms=android&ext=js
+import React, {useCallback} from 'react';
+import {Alert, Button, Linking, StyleSheet, View} from 'react-native';
+
+const SendIntentButton = ({action, extras, children}) => {
+ const handlePress = useCallback(async () => {
+ try {
+ await Linking.sendIntent(action, extras);
+ } catch (e) {
+ Alert.alert(e.message);
+ }
+ }, [action, extras]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+
+ Power Usage Summary
+
+
+ App Notification Settings
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Linking%20Example&ext=tsx
+import React, {useCallback} from 'react';
+import {Alert, Button, Linking, StyleSheet, View} from 'react-native';
+
+type SendIntentButtonProps = {
+ action: string;
+ children: string;
+ extras?: Array<{
+ key: string;
+ value: string | number | boolean;
+ }>;
+};
+
+const SendIntentButton = ({
+ action,
+ extras,
+ children,
+}: SendIntentButtonProps) => {
+ const handlePress = useCallback(async () => {
+ try {
+ await Linking.sendIntent(action, extras);
+ } catch (e: any) {
+ Alert.alert(e.message);
+ }
+ }, [action, extras]);
+
+ return ;
+};
+
+const App = () => {
+ return (
+
+
+ Power Usage Summary
+
+
+ App Notification Settings
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+});
+
+export default App;
+```
+
+
+
+
+# Reference
+
+## Methods
+
+### `addEventListener()`
+
+```tsx
+static addEventListener(
+ type: 'url',
+ handler: (event: {url: string}) => void,
+): EmitterSubscription;
+```
+
+Add a handler to Linking changes by listening to the `url` event type and providing the handler.
+
+---
+
+### `canOpenURL()`
+
+```tsx
+static canOpenURL(url: string): Promise;
+```
+
+Determine whether or not an installed app can handle a given URL.
+
+The method returns a `Promise` object. When it is determined whether or not the given URL can be handled, the promise is resolved and the first parameter is whether or not it can be opened.
+
+The `Promise` will reject on Android if it was impossible to check if the URL can be opened or when targeting Android 11 (SDK 30) if you didn't specify the relevant intent queries in `AndroidManifest.xml`. Similarly on iOS, the promise will reject if you didn't add the specific scheme in the `LSApplicationQueriesSchemes` key inside `Info.plist` (see bellow).
+
+**Parameters:**
+
+| Name | Type | Description |
+| -------------------------------------------------------- | ------ | ---------------- |
+| url
Required
| string | The URL to open. |
+
+:::note
+For web URLs, the protocol (`"http://"`, `"https://"`) must be set accordingly!
+:::
+
+:::warning
+This method has limitations on iOS 9+. From [the official Apple documentation](https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl):
+
+- If your app is linked against an earlier version of iOS but is running in iOS 9.0 or later, you can call this method up to 50 times. After reaching that limit, subsequent calls always resolve to `false`. If the user reinstalls or upgrades the app, iOS resets the limit.
+- As of iOS 9, your app also needs to provide the `LSApplicationQueriesSchemes` key inside `Info.plist` or `canOpenURL()` will always resolve to `false`.
+ :::
+
+:::info
+When targeting Android 11 (SDK 30) you must specify the intents for the schemes you want to handle in `AndroidManifest.xml`. A list of common intents can be found [here](https://developer.android.com/guide/components/intents-common).
+
+For example to handle `https` schemes the following needs to be added to your manifest:
+
+```
+
+
+
+
+
+
+
+
+```
+
+:::
+
+---
+
+### `getInitialURL()`
+
+```tsx
+static getInitialURL(): Promise;
+```
+
+If the app launch was triggered by an app link, it will give the link url, otherwise it will give `null`.
+
+:::info
+To support deep linking on Android, refer https://developer.android.com/training/app-indexing/deep-linking.html#handling-intents.
+:::
+
+:::tip
+`getInitialURL` may return `null` when Remote JS Debugging is active. Disable the debugger to ensure it gets passed.
+:::
+
+---
+
+### `openSettings()`
+
+```tsx
+static openSettings(): Promise;
+```
+
+Open the Settings app and displays the app’s custom settings, if it has any.
+
+---
+
+### `openURL()`
+
+```tsx
+static openURL(url: string): Promise;
+```
+
+Try to open the given `url` with any of the installed apps.
+
+You can use other URLs, like a location (e.g. "geo:37.484847,-122.148386" on Android or "https://maps.apple.com/?ll=37.484847,-122.148386" on iOS), a contact, or any other URL that can be opened with the installed apps.
+
+The method returns a `Promise` object. If the user confirms the open dialog or the url automatically opens, the promise is resolved. If the user cancels the open dialog or there are no registered applications for the url, the promise is rejected.
+
+**Parameters:**
+
+| Name | Type | Description |
+| -------------------------------------------------------- | ------ | ---------------- |
+| url
Required
| string | The URL to open. |
+
+:::note
+This method will fail if the system doesn't know how to open the specified URL. If you're passing in a non-http(s) URL, it's best to check `canOpenURL()` first. For web URLs, the protocol (`"http://"`, `"https://"`) must be set accordingly!
+:::
+
+:::warning
+This method may behave differently in a simulator e.g. `"tel:"` links are not able to be handled in the iOS simulator as there's no access to the dialer app.
+:::
+
+---
+
+### `sendIntent()`
Android
+
+```tsx
+static sendIntent(
+ action: string,
+ extras?: Array<{key: string; value: string | number | boolean}>,
+): Promise;
+```
+
+Launch an Android intent with extras.
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ---------------------------------------------------------- |
+| action
Required
| string |
+| extras | `Array<{key: string, value: string | number | boolean}>` |
diff --git a/website/versioned_docs/version-0.86/metro.mdx b/website/versioned_docs/version-0.86/metro.mdx
new file mode 100644
index 00000000000..dd9d297e77a
--- /dev/null
+++ b/website/versioned_docs/version-0.86/metro.mdx
@@ -0,0 +1,112 @@
+---
+id: metro
+title: Metro
+---
+
+React Native uses [Metro](https://metrobundler.dev/) to build your JavaScript code and assets.
+
+## Configuring Metro
+
+Configuration options for Metro can be customized in your project's `metro.config.js` file. This can export either:
+
+- **An object (recommended)** that will be merged on top of Metro's internal config defaults.
+- [**A function**](#advanced-using-a-config-function) that will be called with Metro's internal config defaults and should return a final config object.
+
+:::tip
+Please see [**Configuring Metro**](https://metrobundler.dev/docs/configuration) on the Metro website for documentation on all available config options.
+:::
+
+In React Native, your Metro config should extend either [`@react-native/metro-config`](https://www.npmjs.com/package/@react-native/metro-config) or [`@expo/metro-config`](https://www.npmjs.com/package/@expo/metro-config). These packages contain essential defaults necessary to build and run React Native apps.
+
+Below is the default `metro.config.js` file in a React Native template project:
+
+{/* prettier-ignore */}
+```js
+const {
+ getDefaultConfig,
+ mergeConfig,
+} = require('@react-native/metro-config');
+
+/**
+ * Metro configuration
+ * https://metrobundler.dev/docs/configuration
+ *
+ * @type {import('metro-config').MetroConfig}
+ */
+const config = {};
+
+module.exports = mergeConfig(getDefaultConfig(__dirname), config);
+```
+
+Metro options you wish to customize can be done so within the `config` object.
+
+### Advanced: Using a config function
+
+Exporting a config function is an opt-in to managing the final config yourself — **Metro will not apply any internal defaults**. This pattern can be useful when needing to read the base default config object from Metro or to set options dynamically.
+
+:::info
+**From `@react-native/metro-config` 0.72.1**, it is no longer necessary to use a config function to access the complete default config. See the **Tip** section below.
+:::
+
+{/* prettier-ignore */}
+```js
+const {
+ getDefaultConfig,
+ mergeConfig,
+} = require('@react-native/metro-config');
+
+module.exports = function (baseConfig) {
+ const defaultConfig = mergeConfig(
+ baseConfig,
+ getDefaultConfig(__dirname),
+ );
+ const {
+ resolver: {assetExts, sourceExts},
+ } = defaultConfig;
+
+ return mergeConfig(defaultConfig, {
+ resolver: {
+ assetExts: assetExts.filter(ext => ext !== 'svg'),
+ sourceExts: [...sourceExts, 'svg'],
+ },
+ });
+};
+```
+
+:::tip
+Using a config function is for advanced use cases. A simpler method than the above, e.g. for customising `sourceExts`, would be to read these defaults from `@react-native/metro-config`.
+
+**Alternative**
+
+{/* prettier-ignore */}
+```js
+const defaultConfig = getDefaultConfig(__dirname);
+
+const config = {
+ resolver: {
+ sourceExts: [...defaultConfig.resolver.sourceExts, 'svg'],
+ },
+};
+
+module.exports = mergeConfig(defaultConfig, config);
+```
+
+**However!**, we recommend copying and editing when overriding these config values — placing the source of truth in your config file.
+
+✅ **Recommended**
+
+{/* prettier-ignore */}
+```js
+const config = {
+ resolver: {
+ sourceExts: ['js', 'ts', 'tsx', 'svg'],
+ },
+};
+```
+
+:::
+
+## Learn more about Metro
+
+- [Metro website](https://metrobundler.dev/)
+- [Video: "Metro & React Native DevX" talk at App.js 2023](https://www.youtube.com/watch?v=c9D4pg0y9cI)
diff --git a/website/versioned_docs/version-0.86/modal.md b/website/versioned_docs/version-0.86/modal.md
new file mode 100644
index 00000000000..d4c8fbde55c
--- /dev/null
+++ b/website/versioned_docs/version-0.86/modal.md
@@ -0,0 +1,276 @@
+---
+id: modal
+title: Modal
+---
+
+The Modal component is a basic way to present content above an enclosing view.
+
+## Example
+
+```SnackPlayer name=Modal&supportedPlatforms=android,ios
+import React, {useState} from 'react';
+import {Alert, Modal, StyleSheet, Text, Pressable, View} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [modalVisible, setModalVisible] = useState(false);
+ return (
+
+
+ {
+ Alert.alert('Modal has been closed.');
+ setModalVisible(!modalVisible);
+ }}>
+
+
+ Hello World!
+ setModalVisible(!modalVisible)}>
+ Hide Modal
+
+
+
+
+ setModalVisible(true)}>
+ Show Modal
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ centeredView: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ modalView: {
+ margin: 20,
+ backgroundColor: 'white',
+ borderRadius: 20,
+ padding: 35,
+ alignItems: 'center',
+ shadowColor: '#000',
+ shadowOffset: {
+ width: 0,
+ height: 2,
+ },
+ shadowOpacity: 0.25,
+ shadowRadius: 4,
+ elevation: 5,
+ },
+ button: {
+ borderRadius: 20,
+ padding: 10,
+ elevation: 2,
+ },
+ buttonOpen: {
+ backgroundColor: '#F194FF',
+ },
+ buttonClose: {
+ backgroundColor: '#2196F3',
+ },
+ textStyle: {
+ color: 'white',
+ fontWeight: 'bold',
+ textAlign: 'center',
+ },
+ modalText: {
+ marginBottom: 15,
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view.md#props).
+
+---
+
+### 🗑️ `animated`
+
+:::warning Deprecated
+Use the [`animationType`](modal.md#animationtype) prop instead.
+:::
+
+---
+
+### `animationType`
+
+The `animationType` prop controls how the modal animates.
+
+Possible values:
+
+- `slide` slides in from the bottom
+- `fade` fades into view
+- `none` appears without an animation
+
+| Type | Default |
+| ----------------------------------- | ------- |
+| enum(`'none'`, `'slide'`, `'fade'`) | `none` |
+
+---
+
+### `backdropColor`
+
+The `backdropColor` of the modal (or background color of the modal's container.) Defaults to `white` if not provided and transparent is `false`. Ignored if `transparent` is `true`.
+
+| Type | Default |
+| --------------- | ------- |
+| [color](colors) | white |
+
+---
+
+### `hardwareAccelerated`
Android
+
+The `hardwareAccelerated` prop controls whether to force hardware acceleration for the underlying window.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `navigationBarTranslucent`
Android
+
+The `navigationBarTranslucent` prop determines whether your modal should go under the system navigation bar. However, `statusBarTranslucent` also needs to be set to `true` to make navigation bar translucent.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `onDismiss`
iOS
+
+The `onDismiss` prop allows passing a function that will be called once the modal has been dismissed.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onOrientationChange`
iOS
+
+The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed. The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `allowSwipeDismissal`
iOS
+
+Controls whether the modal can be dismissed by swiping down on iOS.
+This requires you to implement the `onRequestClose` prop to handle the dismissal.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `ref`
+
+A ref setter that will be assigned an [element node](element-nodes) when mounted.
+
+---
+
+### `onRequestClose`
+
+The `onRequestClose` callback is called when the user taps the hardware back button on Android or the menu button on Apple TV. Because of this required prop, be aware that `BackHandler` events will not be emitted as long as the modal is open.
+On iOS, this callback is called when a Modal is being dismissed using a drag gesture when `presentationStyle` is `pageSheet or formSheet`. When `allowSwipeDismissal` is enabled this callback will be called after dismissing the modal.
+
+| Type |
+| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| function
Required
Android
TV
function
iOS
|
+
+---
+
+### `onShow`
+
+The `onShow` prop allows passing a function that will be called once the modal has been shown.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `presentationStyle`
iOS
+
+The `presentationStyle` prop controls how the modal appears (generally on larger devices such as iPad or plus-sized iPhones). See https://developer.apple.com/reference/uikit/uimodalpresentationstyle for details.
+
+Possible values:
+
+- `fullScreen` covers the screen completely
+- `pageSheet` covers portrait-width view centered (only on larger devices)
+- `formSheet` covers narrow-width view centered (only on larger devices)
+- `overFullScreen` covers the screen completely, but allows transparency
+
+| Type | Default |
+| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
+| enum(`'fullScreen'`, `'pageSheet'`, `'formSheet'`, `'overFullScreen'`) | `fullScreen` if `transparent={false}``overFullScreen` if `transparent={true}` |
+
+---
+
+### `statusBarTranslucent`
Android
+
+The `statusBarTranslucent` prop determines whether your modal should go under the system statusbar.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `supportedOrientations`
iOS
+
+The `supportedOrientations` prop allows the modal to be rotated to any of the specified orientations. On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field.
+
+:::note
+When using `presentationStyle` of `pageSheet` or `formSheet`, this property will be ignored on iOS.
+:::
+
+| Type | Default |
+| -------------------------------------------------------------------------------------------------------------- | -------------- |
+| array of enums(`'portrait'`, `'portrait-upside-down'`, `'landscape'`, `'landscape-left'`, `'landscape-right'`) | `['portrait']` |
+
+---
+
+### `transparent`
+
+The `transparent` prop determines whether your modal will fill the entire view. Setting this to `true` will render the modal over a transparent background.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `visible`
+
+The `visible` prop determines whether your modal is visible.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
diff --git a/website/versioned_docs/version-0.86/more-resources.md b/website/versioned_docs/version-0.86/more-resources.md
new file mode 100644
index 00000000000..da530c5b87f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/more-resources.md
@@ -0,0 +1,46 @@
+---
+id: more-resources
+title: More Resources
+---
+
+There’s always more to learn: developer workflows, shipping to app stores, internationalization, security and more.
+
+## Where to go from here
+
+- [Set up your environment](environment-setup)
+- [Set up your development workflow](running-on-device)
+- [Design and layout your app](flexbox)
+- [Debug your app](debugging)
+- [Make your app cross platform](platform-specific-code)
+- [Get involved in the React Native community](/community/overview)
+
+## Dive deep
+
+- [React’s Documentation](https://react.dev/learn)
+- [MDN’s JavaScript tutorials, reference, and guides](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
+- [Android](https://developer.android.com/docs) and [iOS](https://developer.apple.com/documentation/uikit) platform docs
+
+## IDEs
+
+We recommend using the [VS Code](https://code.visualstudio.com/) code editor and its handy [React Native tools](https://marketplace.visualstudio.com/items?itemName=msjsdiag.vscode-react-native).
+
+## Platforms to try
+
+[Expo](https://docs.expo.dev/) is a framework of tools and services for React Native that focuses on helping you build, ship, and iterate on your app, to use preview deployment workflows that are popular with web development, and to automate your development workflows. Expo also makes it possible to build React Native apps without ever touching Xcode or Android Studio, and it doesn't get in the way if you want to use those tools.
+
+[Ignite](https://github.com/infinitered/ignite) is a starter kit CLI with several React Native boilerplates. The latest, Ignite Maverick, uses MobX-State-Tree for state management, React Navigation, and other common libraries. It has generators for screens, models, and more, and supports Expo out of the box. Ignite also comes with a component library that is tuned for custom designs, theming support, and testing. If you are looking for a preconfigured tech stack, Ignite could be perfect for you.
+
+## Example Apps
+
+Try out apps from the [Showcase](https://reactnative.dev/showcase) to see what React Native is capable of! Looking for something more hands on? Check out this [set of example apps on GitHub](https://github.com/ReactNativeNews/React-Native-Apps). You can look at their source code—try running one on a simulator or device.
+
+## Find, make, and share your own Native Components and TurboModules
+
+React Native has a community of thousands of developers like you making content, tools, tutorials—and Native Components!
+
+Can’t find what you’re looking for in the Core Components? Visit [React Native Directory](https://reactnative.directory) to find what the community has been creating.
+
+:::caution
+This documentation references a legacy set of API and needs to be updated to reflect the New Architecture
+:::
+Interested in making your own Native Component or Module? Making modules for your own use case and sharing them with others on NPM and GitHub helps grow the React Native ecosystem and community! Read the guides to making your own Native Modules ([Android](legacy/native-modules-android.md), [iOS](legacy/native-modules-ios.md)) and Native Components ([Android](legacy/native-components-android.md), [iOS](legacy/native-components-ios.md)).
diff --git a/website/versioned_docs/version-0.86/native-platforms.md b/website/versioned_docs/version-0.86/native-platforms.md
new file mode 100644
index 00000000000..c85050747a7
--- /dev/null
+++ b/website/versioned_docs/version-0.86/native-platforms.md
@@ -0,0 +1,32 @@
+---
+id: native-platform
+title: Native Platform
+---
+
+Your application may need access to platform features that aren’t directly available from react-native or one of the hundreds of [third-party libraries](https://reactnative.directory/) maintained by the community. Maybe you want to reuse some existing Objective-C, Swift, Java, Kotlin or C++ code from the JavaScript runtime. Whatever your reason, React Native exposes a powerful set of API to connect your native code to your JavaScript application code.
+
+This guide introduces:
+
+- **Native Modules:** native libraries that have no User Interface (UI) for the user. Examples would be persistent storage, notifications, network events. These are accessible to your user as JavaScript functions and objects.
+- **Native Component:** native platform views, widgets and controllers that are available to your application's JavaScript code through React Components.
+
+:::note
+You might have previously been familiar with:
+
+- [Legacy Native Modules](./legacy/native-modules-intro);
+- [Legacy Native Components](./legacy/native-components-android);
+
+These are our deprecated native module and component API. You can still use many of these legacy libraries with the New Architecture thanks to our interop layers. You should consider:
+
+- using alternative libraries,
+- upgrading to newer library versions that have first-class support for the New Architecture, or
+- port these libraries yourself to Turbo Native Modules or Fabric Native Components.
+
+:::
+
+1. Native Modules
+ - [Android & iOS](turbo-native-modules.md)
+ - [Cross-Platform with C++](the-new-architecture/pure-cxx-modules.md)
+ - [Advanced: Custom C++ Types](the-new-architecture/custom-cxx-types.md)
+2. Fabric Native Components
+ - [Android & iOS](fabric-native-components.md)
diff --git a/website/versioned_docs/version-0.86/navigation.md b/website/versioned_docs/version-0.86/navigation.md
new file mode 100644
index 00000000000..363b48b1261
--- /dev/null
+++ b/website/versioned_docs/version-0.86/navigation.md
@@ -0,0 +1,121 @@
+---
+id: navigation
+title: Navigating Between Screens
+---
+
+Mobile apps are rarely made up of a single screen. Managing the presentation of, and transition between, multiple screens is typically handled by what is known as a navigator.
+
+This guide covers the various navigation components available in React Native. If you are getting started with navigation, you will probably want to use [React Navigation](navigation.md#react-navigation). React Navigation provides a straightforward navigation solution, with the ability to present common stack navigation and tabbed navigation patterns on both Android and iOS.
+
+If you're integrating React Native into an app that already manages navigation natively, or looking for an alternative to React Navigation, the following library provides native navigation on both platforms: [react-native-navigation](https://github.com/wix/react-native-navigation).
+
+## React Navigation
+
+The community solution to navigation is a standalone library that allows developers to set up the screens of an app with a few lines of code.
+
+### Starter template
+
+If you're starting a new project, you can use the React Navigation template to quickly set up a new project with [Expo](https://expo.dev/):
+
+```shell
+npx create-expo-app@latest --template react-navigation/template
+```
+
+See the project's `README.md` for more information on how to get started.
+
+### Installation and setup
+
+First, you need to install them in your project:
+
+```shell
+npm install @react-navigation/native @react-navigation/native-stack
+```
+
+Next, install the required peer dependencies. You need to run different commands depending on whether your project is an Expo managed project or a bare React Native project.
+
+- If you have an Expo managed project, install the dependencies with `expo`:
+
+ ```shell
+ npx expo install react-native-screens react-native-safe-area-context
+ ```
+
+- If you have a bare React Native project, install the dependencies with `npm`:
+
+ ```shell
+ npm install react-native-screens react-native-safe-area-context
+ ```
+
+ For iOS with bare React Native project, make sure you have [CocoaPods](https://cocoapods.org/) installed. Then install the pods to complete the installation:
+
+ ```shell
+ cd ios
+ pod install
+ cd ..
+ ```
+
+Once you've installed and configured the dependencies, you can move on to setting up your project to use React Navigation.
+
+When using React Navigation, you configure [navigators](https://reactnavigation.org/docs/glossary-of-terms#navigator) in your app. Navigators handle the transition between screens in your app and provide UI such as header, tab bar etc.
+
+Now you are ready to build and run your app on the device/simulator.
+
+### Usage
+
+Now you can create an app with a home screen and a profile screen:
+
+```tsx
+import * as React from 'react';
+import {createStaticNavigation} from '@react-navigation/native';
+import {createNativeStackNavigator} from '@react-navigation/native-stack';
+
+const RootStack = createNativeStackNavigator({
+ screens: {
+ Home: {
+ screen: HomeScreen,
+ options: {title: 'Welcome'},
+ },
+ Profile: {
+ screen: ProfileScreen,
+ },
+ },
+});
+
+const Navigation = createStaticNavigation(RootStack);
+
+export default function App() {
+ return ;
+}
+```
+
+In this example, `RootStack` is a navigator with 2 screens (`Home` and `Profile`), defined in the `screens` property in `createNativeStackNavigator`. Similarly, you can define as many screens as you like.
+
+You can specify options such as the screen title for each screen in the `options` property of each screen. Each screen definition also needs a `screen` property that is a React component or another navigator.
+
+Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:
+
+```tsx
+import {useNavigation} from '@react-navigation/native';
+
+function HomeScreen() {
+ const navigation = useNavigation();
+
+ return (
+
+ navigation.navigate('Profile', {name: 'Jane'})
+ }
+ />
+ );
+}
+
+function ProfileScreen({route}) {
+ return This is {route.params.name}'s profile;
+}
+```
+
+This `native-stack` navigator uses the native APIs: `UINavigationController` on iOS and `Fragment` on Android so that navigation built with `createNativeStackNavigator` will behave the same and have the similar performance characteristics as apps built natively on top of those APIs.
+
+React Navigation also has packages for different kind of navigators such as tabs and drawer. You can use them to implement various patterns in your app.
+
+For a complete intro to React Navigation, follow the [React Navigation Getting Started Guide](https://reactnavigation.org/docs/getting-started).
diff --git a/website/versioned_docs/version-0.86/network.md b/website/versioned_docs/version-0.86/network.md
new file mode 100644
index 00000000000..1a46e514377
--- /dev/null
+++ b/website/versioned_docs/version-0.86/network.md
@@ -0,0 +1,286 @@
+---
+id: network
+title: Networking
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Many mobile apps need to load resources from a remote URL. You may want to make a POST request to a REST API, or you may need to fetch a chunk of static content from another server.
+
+## Using Fetch
+
+React Native provides the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for your networking needs. Fetch will seem familiar if you have used `XMLHttpRequest` or other networking APIs before. You may refer to MDN's guide on [Using Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) for additional information.
+
+### Making requests
+
+In order to fetch content from an arbitrary URL, you can pass the URL to fetch:
+
+```tsx
+fetch('https://mywebsite.com/mydata.json');
+```
+
+Fetch also takes an optional second argument that allows you to customize the HTTP request. You may want to specify additional headers, or make a POST request:
+
+```tsx
+fetch('https://mywebsite.com/endpoint/', {
+ method: 'POST',
+ headers: {
+ Accept: 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ firstParam: 'yourValue',
+ secondParam: 'yourOtherValue',
+ }),
+});
+```
+
+Take a look at the [Fetch Request docs](https://developer.mozilla.org/en-US/docs/Web/API/Request) for a full list of properties.
+
+### Handling the response
+
+The above examples show how you can make a request. In many cases, you will want to do something with the response.
+
+Networking is an inherently asynchronous operation. Fetch method will return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that makes it straightforward to write code that works in an asynchronous manner:
+
+```tsx
+const getMoviesFromApi = () => {
+ return fetch('https://reactnative.dev/movies.json')
+ .then(response => response.json())
+ .then(json => {
+ return json.movies;
+ })
+ .catch(error => {
+ console.error(error);
+ });
+};
+```
+
+You can also use the `async` / `await` syntax in a React Native app:
+
+```tsx
+const getMoviesFromApiAsync = async () => {
+ try {
+ const response = await fetch(
+ 'https://reactnative.dev/movies.json',
+ );
+ const json = await response.json();
+ return json.movies;
+ } catch (error) {
+ console.error(error);
+ }
+};
+```
+
+Don't forget to catch any errors that may be thrown by `fetch`, otherwise they will be dropped silently.
+
+
+
+
+```SnackPlayer name=Fetch%20Example&ext=js
+import React, {useEffect, useState} from 'react';
+import {ActivityIndicator, FlatList, Text, View} from 'react-native';
+
+const App = () => {
+ const [isLoading, setLoading] = useState(true);
+ const [data, setData] = useState([]);
+
+ const getMovies = async () => {
+ try {
+ const response = await fetch('https://reactnative.dev/movies.json');
+ const json = await response.json();
+ setData(json.movies);
+ } catch (error) {
+ console.error(error);
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ useEffect(() => {
+ getMovies();
+ }, []);
+
+ return (
+
+ {isLoading ? (
+
+ ) : (
+ id}
+ renderItem={({item}) => (
+
+ {item.title}, {item.releaseYear}
+
+ )}
+ />
+ )}
+
+ );
+};
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Fetch%20Example&ext=tsx
+import React, {useEffect, useState} from 'react';
+import {ActivityIndicator, FlatList, Text, View} from 'react-native';
+
+type Movie = {
+ id: string;
+ title: string;
+ releaseYear: string;
+};
+
+type MoviesResponse = {
+ title: string;
+ description: string;
+ movies: Movie[];
+};
+
+const App = () => {
+ const [isLoading, setLoading] = useState(true);
+ const [data, setData] = useState([]);
+
+ const getMovies = async () => {
+ try {
+ const response = await fetch('https://reactnative.dev/movies.json');
+ const json = (await response.json()) as MoviesResponse;
+ setData(json.movies);
+ } catch (error) {
+ console.error(error);
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ useEffect(() => {
+ getMovies();
+ }, []);
+
+ return (
+
+ {isLoading ? (
+
+ ) : (
+ id}
+ renderItem={({item}) => (
+
+ {item.title}, {item.releaseYear}
+
+ )}
+ />
+ )}
+
+ );
+};
+
+export default App;
+```
+
+
+
+
+:::info
+By default, iOS 9.0 or later enforce App Transport Security (ATS). ATS requires any HTTP connection to use HTTPS. If you need to fetch from a cleartext URL (one that begins with `http`) you will first need to [add an ATS exception](integration-with-existing-apps.md#test-your-integration). If you know ahead of time what domains you will need access to, it is more secure to add exceptions only for those domains; if the domains are not known until runtime you can [disable ATS completely](publishing-to-app-store.md#1-enable-app-transport-security). Note however that from January 2017, [Apple's App Store review will require reasonable justification for disabling ATS](https://forums.developer.apple.com/thread/48979). See [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) for more information.
+:::
+
+:::tip
+On Android, as of API Level 28, clear text traffic is also blocked by default. This behaviour can be overridden by setting [`android:usesCleartextTraffic`](https://developer.android.com/guide/topics/manifest/application-element#usesCleartextTraffic) in the app manifest file.
+:::
+
+## Using Other Networking Libraries
+
+The [XMLHttpRequest API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) is built into React Native. This means that you can use third party libraries such as [frisbee](https://github.com/niftylettuce/frisbee) or [axios](https://github.com/axios/axios) that depend on it, or you can use the XMLHttpRequest API directly if you prefer.
+
+```tsx
+const request = new XMLHttpRequest();
+request.onreadystatechange = e => {
+ if (request.readyState !== 4) {
+ return;
+ }
+
+ if (request.status === 200) {
+ console.log('success', request.responseText);
+ } else {
+ console.warn('error');
+ }
+};
+
+request.open('GET', 'https://mywebsite.com/endpoint/');
+request.send();
+```
+
+:::warning Caution
+The security model for XMLHttpRequest is different than on web as there is no concept of [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) in native apps.
+:::
+
+## WebSocket Support
+
+React Native also supports [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket), a protocol which provides full-duplex communication channels over a single TCP connection.
+
+```tsx
+const ws = new WebSocket('ws://host.com/path');
+
+ws.onopen = () => {
+ // connection opened
+ ws.send('something'); // send a message
+};
+
+ws.onmessage = e => {
+ // a message was received
+ console.log(e.data);
+};
+
+ws.onerror = e => {
+ // an error occurred
+ console.log(e.message);
+};
+
+ws.onclose = e => {
+ // connection closed
+ console.log(e.code, e.reason);
+};
+```
+
+## Known Issues with `fetch` and cookie based authentication
+
+The following options are currently not working with `fetch`
+
+- `redirect:manual`
+- `credentials:omit`
+
+* Having same name headers on Android will result in only the latest one being present. A temporary solution can be found here: https://github.com/facebook/react-native/issues/18837#issuecomment-398779994.
+* Cookie based authentication is currently unstable. You can view some of the issues raised here: https://github.com/facebook/react-native/issues/23185
+* As a minimum on iOS, when redirected through a `302`, if a `Set-Cookie` header is present, the cookie is not set properly. Since the redirect cannot be handled manually this might cause a scenario where infinite requests occur if the redirect is the result of an expired session.
+
+## Configuring NSURLSession on iOS
+
+For some applications it may be appropriate to provide a custom `NSURLSessionConfiguration` for the underlying `NSURLSession` that is used for network requests in a React Native application running on iOS. For instance, one may need to set a custom user agent string for all network requests coming from the app or supply `NSURLSession` with an ephemeral `NSURLSessionConfiguration`. The function `RCTSetCustomNSURLSessionConfigurationProvider` allows for such customization. Remember to add the following import to the file in which `RCTSetCustomNSURLSessionConfigurationProvider` will be called:
+
+```objectivec
+#import
+```
+
+`RCTSetCustomNSURLSessionConfigurationProvider` should be called early in the application life cycle such that it is readily available when needed by React, for instance:
+
+```objectivec
+-(void)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ // set RCTSetCustomNSURLSessionConfigurationProvider
+ RCTSetCustomNSURLSessionConfigurationProvider(^NSURLSessionConfiguration *{
+ NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
+ // configure the session
+ return configuration;
+ });
+
+ // set up React
+ _bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
+}
+```
diff --git a/website/versioned_docs/version-0.86/nodes.md b/website/versioned_docs/version-0.86/nodes.md
new file mode 100644
index 00000000000..1c8a88ba918
--- /dev/null
+++ b/website/versioned_docs/version-0.86/nodes.md
@@ -0,0 +1,18 @@
+---
+id: nodes
+title: Nodes from refs
+---
+
+React Native apps render a native view tree that represents the UI, similar to how React DOM does on Web (the DOM tree). React Native provides imperative access to this tree via [refs](https://react.dev/learn/manipulating-the-dom-with-refs), which are returned by all native components (including those rendered by built-in components like [`View`](/docs/next/view)).
+
+React Native provides 3 types of nodes:
+
+- [Elements](/docs/next/element-nodes): element nodes represent native components in the native view tree (similar to [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) nodes on Web). They are provided by all native components via refs.
+- [Text](/docs/next/text-nodes): text nodes represent raw text content on the tree (similar to [`Text`](https://developer.mozilla.org/en-US/docs/Web/API/Text) nodes on Web). They are not directly accessible via `refs`, but can be accessed using methods like [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes) on element refs.
+- [Documents](/docs/next/document-nodes): document nodes represent a complete native view tree (similar to [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/Document) nodes on Web). Like text nodes, they can only be accessed through other nodes, using properties like [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument).
+
+As on Web, these nodes can be used to traverse the rendered UI tree, access layout information or execute imperative operations like `focus`.
+
+:::info
+**Unlike on Web, these nodes do not allow mutation** (e.g.: [`node.appendChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)), as the tree contents are fully managed by the React renderer.
+:::
diff --git a/website/versioned_docs/version-0.86/optimizing-flatlist-configuration.md b/website/versioned_docs/version-0.86/optimizing-flatlist-configuration.md
new file mode 100644
index 00000000000..a81ec0c6cf6
--- /dev/null
+++ b/website/versioned_docs/version-0.86/optimizing-flatlist-configuration.md
@@ -0,0 +1,154 @@
+---
+id: optimizing-flatlist-configuration
+title: Optimizing FlatList Configuration
+---
+
+## Terms
+
+- **VirtualizedList:** The component behind `FlatList` (React Native's implementation of the [`Virtual List`](https://bvaughn.github.io/react-virtualized/#/components/List) concept.)
+
+- **Memory consumption:** How much information about your list is being stored in memory, which could lead to an app crash.
+
+- **Responsiveness:** Application ability to respond to interactions. Low responsiveness, for instance, is when you touch on a component and it waits a bit to respond, instead of responding immediately as expected.
+
+- **Blank areas:** When `VirtualizedList` can't render your items fast enough, you may enter a part of your list with non-rendered components that appear as blank space.
+
+- **Viewport:** The visible area of content that is rendered to pixels.
+
+- **Window:** The area in which items should be mounted, which is generally much larger than the viewport.
+
+## Props
+
+Here are a list of props that can help to improve `FlatList` performance:
+
+### `removeClippedSubviews`
+
+| Type | Default |
+| ------- | ------------------------------------ |
+| Boolean | `true` on Android, otherwise `false` |
+
+If `true`, views that are outside of the viewport are automatically detached from the native view hierarchy.
+
+**Pros:** This reduces time spent on the main thread, and thus reduces the risk of dropped frames, by excluding views outside of the viewport from the native rendering and drawing traversals.
+
+**Cons:** Be aware that this implementation can have bugs, such as missing content (mainly observed on iOS), especially if you are doing complex things with transforms and/or absolute positioning. Also note this does not save significant memory because the views are not deallocated, only detached.
+
+### `maxToRenderPerBatch`
+
+| Type | Default |
+| ------ | ------- |
+| Number | 10 |
+
+It is a `VirtualizedList` prop that can be passed through `FlatList`. This controls the amount of items rendered per batch, which is the next chunk of items rendered on every scroll.
+
+**Pros:** Setting a bigger number means less visual blank areas when scrolling (increases the fill rate).
+
+**Cons:** More items per batch means longer periods of JavaScript execution potentially blocking other event processing, like presses, hurting responsiveness.
+
+### `updateCellsBatchingPeriod`
+
+| Type | Default |
+| ------ | ------- |
+| Number | 50 |
+
+While `maxToRenderPerBatch` tells the amount of items rendered per batch, setting `updateCellsBatchingPeriod` tells your `VirtualizedList` the delay in milliseconds between batch renders (how frequently your component will be rendering the windowed items).
+
+**Pros:** Combining this prop with `maxToRenderPerBatch` gives you the power to, for example, render more items in a less frequent batch, or less items in a more frequent batch.
+
+**Cons:** Less frequent batches may cause blank areas, More frequent batches may cause responsiveness issues.
+
+### initialNumToRender
+
+| Type | Default |
+| ------ | ------- |
+| Number | 10 |
+
+The initial amount of items to render.
+
+**Pros:** Define precise number of items that would cover the screen for every device. This can be a big performance boost for the initial render.
+
+**Cons:** Setting a low `initialNumToRender` may cause blank areas, especially if it's too small to cover the viewport on initial render.
+
+### `windowSize`
+
+| Type | Default |
+| ------ | ------- |
+| Number | 21 |
+
+The number passed here is a measurement unit where 1 is equivalent to your viewport height. The default value is 21 (10 viewports above, 10 below, and one in between).
+
+**Pros:** Bigger `windowSize` will result in less chance of seeing blank space while scrolling. On the other hand, smaller `windowSize` will result in fewer items mounted simultaneously, saving memory.
+
+**Cons:** For a bigger `windowSize`, you will have more memory consumption. For a lower `windowSize`, you will have a bigger chance of seeing blank areas.
+
+## List items
+
+Below are some tips about list item components. They are the core of your list, so they need to be fast.
+
+### Use basic components
+
+The more complex your components are, the slower they will render. Try to avoid a lot of logic and nesting in your list items. If you are reusing this list item component a lot in your app, create a component only for your big lists and make them with as little logic and nesting as possible.
+
+### Use light components
+
+The heavier your components are, the slower they render. Avoid heavy images (use a cropped version or thumbnail for list items, as small as possible). Talk to your design team, use as little effects and interactions and information as possible in your list. Show them in your item's detail.
+
+### Use `memo()`
+
+`React.memo()` creates a memoized component that will be re-rendered only when the props passed to the component change. We can use this function to optimize the components in the FlatList.
+
+```tsx
+import React, {memo} from 'react';
+import {View, Text} from 'react-native';
+
+const MyListItem = memo(
+ ({title}: {title: string}) => (
+
+ {title}
+
+ ),
+ (prevProps, nextProps) => {
+ return prevProps.title === nextProps.title;
+ },
+);
+
+export default MyListItem;
+```
+
+In this example, we have determined that MyListItem should be re-rendered only when the title changes. We passed the comparison function as the second argument to React.memo() so that the component is re-rendered only when the specified prop is changed. If the comparison function returns true, the component will not be re-rendered.
+
+### Use cached optimized images
+
+You can use the community packages (such as [@d11/react-native-fast-image](https://github.com/ds-horizon/react-native-fast-image) from [Dream11](https://github.com/ds-horizon)) for more performant images. Every image in your list is a `new Image()` instance. The faster it reaches the `loaded` hook, the faster your JavaScript thread will be free again.
+
+### Use `getItemLayout`
+
+If all your list item components have the same height (or width, for a horizontal list), providing the [getItemLayout](flatlist#getitemlayout) prop removes the need for your `FlatList` to manage async layout calculations. This is a very desirable optimization technique.
+
+If your components have dynamic size and you really need performance, consider asking your design team if they may think of a redesign in order to perform better.
+
+### Use `keyExtractor` or `key`
+
+You can set the [`keyExtractor`](flatlist#keyextractor) to your `FlatList` component. This prop is used for caching and as the React `key` to track item re-ordering.
+
+You can also use a `key` prop in your item component.
+
+### Avoid anonymous function on `renderItem`
+
+For functional components, move the `renderItem` function outside of the returned JSX. Also, ensure that it is wrapped in a `useCallback` hook to prevent it from being recreated each render.
+
+For class components, move the `renderItem` function outside of the render function, so it won't recreate itself each time the render function is called.
+
+```tsx
+const renderItem = useCallback(({item}) => (
+
+ {item.title}
+
+ ), []);
+
+return (
+ // ...
+ ;
+ // ...
+);
+```
diff --git a/website/versioned_docs/version-0.86/optimizing-javascript-loading.md b/website/versioned_docs/version-0.86/optimizing-javascript-loading.md
new file mode 100644
index 00000000000..e12d8631832
--- /dev/null
+++ b/website/versioned_docs/version-0.86/optimizing-javascript-loading.md
@@ -0,0 +1,222 @@
+---
+id: optimizing-javascript-loading
+title: Optimizing JavaScript loading
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Parsing and running JavaScript code requires memory and time. Because of this, as your app grows, it's often useful to delay loading code until it's needed for the first time. React Native comes with some standard optimizations that are on by default, and there are techniques you can adopt in your own code to help React load your app more efficiently. There are also some advanced automatic optimizations (with their own tradeoffs) that are suitable for very large apps.
+
+## Recommended: Use Hermes
+
+Hermes is the default engine for new React Native apps, and is highly optimized for efficient code loading. In release builds, JavaScript code is fully compiled to bytecode ahead of time. Bytecode is loaded to memory on-demand and does not need to be parsed like plain JavaScript does.
+
+:::info
+Read more about using Hermes in React Native [here](./hermes).
+:::
+
+## Recommended: Lazy-load large components
+
+If a component with a lot of code/dependencies is not likely to be used when initially rendering your app, you can use React's [`lazy`](https://react.dev/reference/react/lazy) API to defer loading its code until it's rendered for the first time. Typically, you should consider lazy-loading screen-level components in your app, so that adding new screens to your app does not increase its startup time.
+
+:::info
+Read more about [lazy-loading components with Suspense
+](https://react.dev/reference/react/lazy#suspense-for-code-splitting), including code examples, in React's documentation.
+:::
+
+### Tip: Avoid module side effects
+
+Lazy-loading components can change the behavior of your app if your component modules (or their dependencies) have _side effects_, such as modifying global variables or subscribing to events outside of a component. Most modules in React apps should not have any side effects.
+
+```tsx title="SideEffects.tsx"
+import Logger from './utils/Logger';
+
+// 🚩 🚩 🚩 Side effect! This must be executed before React can even begin to
+// render the SplashScreen component, and can unexpectedly break code elsewhere
+// in your app if you later decide to lazy-load SplashScreen.
+global.logger = new Logger();
+
+export function SplashScreen() {
+ // ...
+}
+```
+
+## Advanced: Call `require` inline
+
+Sometimes you may want to defer loading some code until you use it for the first time, without using `lazy` or an asynchronous `import()`. You can do this by using the [`require()`](https://metrobundler.dev/docs/module-api/#require) function where you would otherwise use a static `import` at the top of the file.
+
+```tsx title="VeryExpensive.tsx"
+import {Component} from 'react';
+import {Text} from 'react-native';
+// ... import some very expensive modules
+
+export default function VeryExpensive() {
+ // ... lots and lots of rendering logic
+ return Very Expensive Component;
+}
+```
+
+```tsx title="Optimized.tsx"
+import {useCallback, useState} from 'react';
+import {TouchableOpacity, View, Text} from 'react-native';
+// Usually we would write a static import:
+// import VeryExpensive from './VeryExpensive';
+
+let VeryExpensive = null;
+
+export default function Optimize() {
+ const [needsExpensive, setNeedsExpensive] = useState(false);
+ const didPress = useCallback(() => {
+ if (VeryExpensive == null) {
+ VeryExpensive = require('./VeryExpensive').default;
+ }
+
+ setNeedsExpensive(true);
+ }, []);
+
+ return (
+
+
+ Load
+
+ {needsExpensive ? : null}
+
+ );
+}
+```
+
+## Advanced: Automatically inline `require` calls
+
+If you use the React Native CLI to build your app, `require` calls (but not `import`s) will automatically be inlined for you, both in your code and inside any third-party packages (`node_modules`) you use.
+
+```tsx
+import {useCallback, useState} from 'react';
+import {TouchableOpacity, View, Text} from 'react-native';
+
+// This top-level require call will be evaluated lazily as part of the component below.
+const VeryExpensive = require('./VeryExpensive').default;
+
+export default function Optimize() {
+ const [needsExpensive, setNeedsExpensive] = useState(false);
+ const didPress = useCallback(() => {
+ setNeedsExpensive(true);
+ }, []);
+
+ return (
+
+
+ Load
+
+ {needsExpensive ? : null}
+
+ );
+}
+```
+
+:::info
+Some React Native frameworks disable this behavior. In particular, in Expo projects, `require` calls are not inlined by default. You can enable this optimization by editing your project's Metro config and setting `inlineRequires: true` in [`getTransformOptions`](https://metrobundler.dev/docs/configuration#gettransformoptions).
+:::
+
+### Pitfalls of inline `require`s
+
+Inlining `require` calls changes the order in which modules are evaluated, and can even cause some modules to _never_ be evaluated. This is usually safe to do automatically, because JavaScript modules are often written to be side-effect-free.
+
+If one of your modules does have side effects - for example, if it initializes some logging mechanism, or patches a global API used by the rest of your code - then you might see unexpected behavior or even crashes. In those cases, you may want to exclude certain modules from this optimization, or disable it entirely.
+
+To **disable all automatic inlining of `require` calls:**
+
+Update your `metro.config.js` to set the `inlineRequires` transformer option to `false`:
+
+```tsx title="metro.config.js"
+module.exports = {
+ transformer: {
+ async getTransformOptions() {
+ return {
+ transform: {
+ inlineRequires: false,
+ },
+ };
+ },
+ },
+};
+```
+
+To only **exclude certain modules from `require` inlining:**
+
+There are two relevant transformer options: `inlineRequires.blockList` and `nonInlinedRequires`. See the code snippet for examples of how to use each one.
+
+```tsx title="metro.config.js"
+module.exports = {
+ transformer: {
+ async getTransformOptions() {
+ return {
+ transform: {
+ inlineRequires: {
+ blockList: {
+ // require() calls in `DoNotInlineHere.js` will not be inlined.
+ [require.resolve('./src/DoNotInlineHere.js')]: true,
+
+ // require() calls anywhere else will be inlined, unless they
+ // match any entry nonInlinedRequires (see below).
+ },
+ },
+ nonInlinedRequires: [
+ // require('react') calls will not be inlined anywhere
+ 'react',
+ ],
+ },
+ };
+ },
+ },
+};
+```
+
+See the documentation for [`getTransformOptions` in Metro](https://metrobundler.dev/docs/configuration#gettransformoptions) for more details on setting up and fine-tuning your inline `require`s.
+
+## Advanced: Use random access module bundles (non-Hermes)
+
+:::tip
+**Not supported when [using Hermes](#use-hermes).** Hermes bytecode is not compatible with the RAM bundle format, and provides the same (or better) performance in all use cases.
+:::
+
+Random access module bundles (also known as RAM bundles) work in conjunction with the techniques mentioned above to limit the amount of JavaScript code that needs to be parsed and loaded into memory. Each module is stored as a separate string (or file) which is only parsed when the module needs to be executed.
+
+RAM bundles may be physically split into separate files, or they may use the _indexed_ format, consisting of a lookup table of multiple modules in a single file.
+
+
+
+
+On Android enable the RAM format by editing your `android/app/build.gradle` file. Before the line `apply from: "../../node_modules/react-native/react.gradle"` add or amend the `project.ext.react` block:
+
+```
+project.ext.react = [
+ bundleCommand: "ram-bundle",
+]
+```
+
+Use the following lines on Android if you want to use a single indexed file:
+
+```
+project.ext.react = [
+ bundleCommand: "ram-bundle",
+ extraPackagerArgs: ["--indexed-ram-bundle"]
+]
+```
+
+
+
+
+On iOS, RAM bundles are always indexed ( = single file).
+
+Enable the RAM format in Xcode by editing the build phase "Bundle React Native code and images". Before `../node_modules/react-native/scripts/react-native-xcode.sh` add `export BUNDLE_COMMAND="ram-bundle"`:
+
+```
+export BUNDLE_COMMAND="ram-bundle"
+export NODE_BINARY=node
+../node_modules/react-native/scripts/react-native-xcode.sh
+```
+
+
+
+
+See the documentation for [`getTransformOptions` in Metro](https://metrobundler.dev/docs/configuration#gettransformoptions) for more details on setting up and fine-tuning your RAM bundle build.
diff --git a/website/versioned_docs/version-0.86/other-debugging-methods.md b/website/versioned_docs/version-0.86/other-debugging-methods.md
new file mode 100644
index 00000000000..28b13d1e087
--- /dev/null
+++ b/website/versioned_docs/version-0.86/other-debugging-methods.md
@@ -0,0 +1,36 @@
+---
+id: other-debugging-methods
+title: Other Debugging Methods
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+This page covers how to use legacy JavaScript debugging methods. If you are getting started with a new React Native or Expo app, we recommend using [React Native DevTools](./react-native-devtools).
+
+## Safari Developer Tools (direct JSC debugging)
+
+You can use Safari to debug the iOS version of your app when using [JavaScriptCore](https://trac.webkit.org/wiki/JavaScriptCore) (JSC) as your app's runtime.
+
+1. **Physical devices only**: Open the Settings app, and navigate to Safari > Advanced, and make sure "Web Inspector" is turned on.
+2. On your Mac, open Safari and enable the Develop menu. This can be found under Safari > Settings..., then the Advanced tab, then selecting "Show features for web developers".
+3. Find your device under the Develop menu, and select the "JSContext" item from the submenu. This will open Safari's Web Inspector, which includes Console and Sources panels similar to Chrome DevTools.
+
+
+
+:::tip
+While source maps may not be enabled by default, you can follow [this guide](https://blog.nparashuram.com/2019/10/debugging-react-native-ios-apps-with.html) or [video](https://www.youtube.com/watch?v=GrGqIIz51k4) to enable them and set break points at the right places in the source code.
+:::
+
+:::tip
+Every time the app is reloaded, a new JSContext is created. Choosing "Automatically Show Web Inspectors for JSContexts" saves you from having to select the latest JSContext manually.
+:::
+
+## Remote JavaScript Debugging (removed)
+
+:::warning Important
+Remote JavaScript Debugging has been removed as of React Native 0.79. See the original [deprecation announcement](https://github.com/react-native-community/discussions-and-proposals/discussions/734).
+
+If you are on an older version of React Native, please go to the docs [for your version](/versions).
+:::
+
+
diff --git a/website/versioned_docs/version-0.86/out-of-tree-platforms.md b/website/versioned_docs/version-0.86/out-of-tree-platforms.md
new file mode 100644
index 00000000000..a20f6ad2f2e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/out-of-tree-platforms.md
@@ -0,0 +1,47 @@
+---
+id: out-of-tree-platforms
+title: Out-of-Tree Platforms
+---
+
+React Native is not only for Android and iOS devices - our partners and the community maintain projects that bring React Native to other platforms, such as:
+
+**From Partners**
+
+- [React Native macOS](https://github.com/microsoft/react-native-macos) - React Native for macOS and Cocoa.
+- [React Native Windows](https://github.com/microsoft/react-native-windows) - React Native for Microsoft's Universal Windows Platform (UWP).
+- [React Native visionOS](https://github.com/callstack/react-native-visionos) - React Native for Apple's visionOS.
+
+**From Community**
+
+- [React Native tvOS](https://github.com/react-native-tvos/react-native-tvos) - React Native for Apple TV and Android TV devices.
+- [React Native Web](https://github.com/necolas/react-native-web) - React Native on the web using React DOM.
+- [React Native Skia](https://github.com/react-native-skia/react-native-skia) - React Native using [Skia](https://skia.org/) as a renderer. Currently supports Linux and macOS.
+
+## Creating your own React Native platform
+
+Right now the process of creating a React Native platform from scratch is not very well documented - one of the goals of the upcoming re-architecture ([Fabric](/blog/2018/06/14/state-of-react-native-2018)) is to make maintaining a platform easier.
+
+### Bundling
+
+As of React Native 0.57 you can now register your React Native platform with React Native's JavaScript bundler, [Metro](https://metrobundler.dev/). This means you can pass `--platform example` to `npx react-native bundle`, and it will look for JavaScript files with the `.example.js` suffix.
+
+To register your platform with RNPM, your module's name must match one of these patterns:
+
+- `react-native-example` - It will search all top-level modules that start with `react-native-`
+- `@org/react-native-example` - It will search for modules that start with `react-native-` under any scope
+- `@react-native-example/module` - It will search in all modules under scopes with names starting with `@react-native-`
+
+You must also have an entry in your `package.json` like this:
+
+```json
+{
+ "rnpm": {
+ "haste": {
+ "providesModuleNodeModules": ["react-native-example"],
+ "platforms": ["example"]
+ }
+ }
+}
+```
+
+`"providesModuleNodeModules"` is an array of modules that will get added to the Haste module search path, and `"platforms"` is an array of platform suffixes that will be added as valid platforms.
diff --git a/website/versioned_docs/version-0.86/panresponder.md b/website/versioned_docs/version-0.86/panresponder.md
new file mode 100644
index 00000000000..fa6d8b8ee4e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/panresponder.md
@@ -0,0 +1,177 @@
+---
+id: panresponder
+title: PanResponder
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+`PanResponder` reconciles several touches into a single gesture. It makes single-touch gestures resilient to extra touches, and can be used to recognize basic multi-touch gestures.
+
+By default, `PanResponder` holds an `InteractionManager` handle to block long-running JS events from interrupting active gestures.
+
+It provides a predictable wrapper of the responder handlers provided by the [gesture responder system](gesture-responder-system.md). For each handler, it provides a new `gestureState` object alongside the native event object:
+
+```
+onPanResponderMove: (event, gestureState) => {}
+```
+
+A native event is a synthetic touch event with form of [PressEvent](pressevent).
+
+A `gestureState` object has the following:
+
+- `stateID` - ID of the gestureState- persisted as long as there's at least one touch on screen
+- `moveX` - the latest screen coordinates of the recently-moved touch
+- `moveY` - the latest screen coordinates of the recently-moved touch
+- `x0` - the screen coordinates of the responder grant
+- `y0` - the screen coordinates of the responder grant
+- `dx` - accumulated distance of the gesture since the touch started
+- `dy` - accumulated distance of the gesture since the touch started
+- `vx` - current velocity of the gesture
+- `vy` - current velocity of the gesture
+- `numberActiveTouches` - Number of touches currently on screen
+
+## Usage Pattern
+
+```tsx
+const ExampleComponent = () => {
+ const panResponder = React.useRef(
+ PanResponder.create({
+ // Ask to be the responder:
+ onStartShouldSetPanResponder: (evt, gestureState) => true,
+ onStartShouldSetPanResponderCapture: (evt, gestureState) =>
+ true,
+ onMoveShouldSetPanResponder: (evt, gestureState) => true,
+ onMoveShouldSetPanResponderCapture: (evt, gestureState) =>
+ true,
+
+ onPanResponderGrant: (evt, gestureState) => {
+ // The gesture has started. Show visual feedback so the user knows
+ // what is happening!
+ // gestureState.d{x,y} will be set to zero now
+ },
+ onPanResponderMove: (evt, gestureState) => {
+ // The most recent move distance is gestureState.move{X,Y}
+ // The accumulated gesture distance since becoming responder is
+ // gestureState.d{x,y}
+ },
+ onPanResponderTerminationRequest: (evt, gestureState) =>
+ true,
+ onPanResponderRelease: (evt, gestureState) => {
+ // The user has released all touches while this view is the
+ // responder. This typically means a gesture has succeeded
+ },
+ onPanResponderTerminate: (evt, gestureState) => {
+ // Another component has become the responder, so this gesture
+ // should be cancelled
+ },
+ onShouldBlockNativeResponder: (evt, gestureState) => {
+ // Returns whether this component should block native components from becoming the JS
+ // responder. Returns true by default. Is currently only supported on android.
+ return true;
+ },
+ }),
+ ).current;
+
+ return ;
+};
+```
+
+## Example
+
+`PanResponder` works with `Animated` API to help build complex gestures in the UI. The following example contains an animated `View` component which can be dragged freely across the screen
+
+```SnackPlayer name=PanResponder
+import React, {useRef} from 'react';
+import {Animated, View, StyleSheet, PanResponder, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const pan = useRef(new Animated.ValueXY()).current;
+
+ const panResponder = useRef(
+ PanResponder.create({
+ onMoveShouldSetPanResponder: () => true,
+ onPanResponderMove: Animated.event([null, {dx: pan.x, dy: pan.y}]),
+ onPanResponderRelease: () => {
+ pan.extractOffset();
+ },
+ }),
+ ).current;
+
+ return (
+
+
+ Drag this box!
+
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ titleText: {
+ fontSize: 14,
+ lineHeight: 24,
+ fontWeight: 'bold',
+ },
+ box: {
+ height: 150,
+ width: 150,
+ backgroundColor: 'blue',
+ borderRadius: 5,
+ },
+});
+
+export default App;
+```
+
+Try the [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/PanResponder/PanResponderExample.js).
+
+---
+
+# Reference
+
+## Methods
+
+### `create()`
+
+```tsx
+static create(config: PanResponderCallbacks): PanResponderInstance;
+```
+
+**Parameters:**
+
+| Name | Type | Description |
+| ----------------------------------------------------------- | ------ | ----------- |
+| config
Required
| object | Refer below |
+
+The `config` object provides enhanced versions of all of the responder callbacks that provide not only the [`PressEvent`](pressevent), but also the `PanResponder` gesture state, by replacing the word `Responder` with `PanResponder` in each of the typical `onResponder*` callbacks. For example, the `config` object would look like:
+
+- `onMoveShouldSetPanResponder: (e, gestureState) => {...}`
+- `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}`
+- `onStartShouldSetPanResponder: (e, gestureState) => {...}`
+- `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}`
+- `onPanResponderReject: (e, gestureState) => {...}`
+- `onPanResponderGrant: (e, gestureState) => {...}`
+- `onPanResponderStart: (e, gestureState) => {...}`
+- `onPanResponderEnd: (e, gestureState) => {...}`
+- `onPanResponderRelease: (e, gestureState) => {...}`
+- `onPanResponderMove: (e, gestureState) => {...}`
+- `onPanResponderTerminate: (e, gestureState) => {...}`
+- `onPanResponderTerminationRequest: (e, gestureState) => {...}`
+- `onShouldBlockNativeResponder: (e, gestureState) => {...}`
+
+In general, for events that have capture equivalents, we update the gestureState once in the capture phase and can use it in the bubble phase as well.
+
+Be careful with `onStartShould*` callbacks. They only reflect updated `gestureState` for start/end events that bubble/capture to the Node. Once the node is the responder, you can rely on every start/end event being processed by the gesture and `gestureState` being updated accordingly. (numberActiveTouches) may not be totally accurate unless you are the responder.
diff --git a/website/versioned_docs/version-0.86/performance.md b/website/versioned_docs/version-0.86/performance.md
new file mode 100644
index 00000000000..e4fc1a60cab
--- /dev/null
+++ b/website/versioned_docs/version-0.86/performance.md
@@ -0,0 +1,92 @@
+---
+id: performance
+title: Performance Overview
+---
+
+A compelling reason to use React Native instead of WebView-based tools is to achieve at least 60 frames per second and provide a native look and feel to your apps. Whenever feasible, we aim for React Native to handle optimizations automatically, allowing you to focus on your app without worrying about performance. However, there are certain areas where we haven't quite reached that level yet, and others where React Native (similar to writing native code directly) cannot determine the best optimization approach for you. In such cases, manual intervention becomes necessary. We strive to deliver buttery-smooth UI performance by default, but there may be instances where that isn't possible.
+
+This guide is intended to teach you some basics to help you to [troubleshoot performance issues](profiling.md), as well as discuss [common sources of problems and their suggested solutions](performance.md#common-sources-of-performance-problems).
+
+## What you need to know about frames
+
+Your grandparents' generation called movies ["moving pictures"](https://www.youtube.com/watch?v=F1i40rnpOsA) for a reason: realistic motion in video is an illusion created by quickly changing static images at a consistent speed. We refer to each of these images as frames. The number of frames that is displayed each second has a direct impact on how smooth and ultimately life-like a video (or user interface) seems to be. iOS and Android devices display at least 60 frames per second, which gives you and the UI system at most 16.67ms to do all of the work needed to generate the static image (frame) that the user will see on the screen for that interval. If you are unable to do the work necessary to generate that frame within the allotted time slot, then you will "drop a frame" and the UI will appear unresponsive.
+
+Now to confuse the matter a little bit, open up the [Dev Menu](debugging.md#opening-the-dev-menu) in your app and toggle `Show Perf Monitor`. You will notice that there are two different frame rates.
+
+
+
+### JS frame rate (JavaScript thread)
+
+For most React Native applications, your business logic will run on the JavaScript thread. This is where your React application lives, API calls are made, touch events are processed, and more. Updates to native-backed views are batched and sent over to the native side at the end of each iteration of the event loop, before the frame deadline (if all goes well). If the JavaScript thread is unresponsive for a frame, it will be considered a dropped frame. For example, if you were to set a new state on the root component of a complex application and it resulted in re-rendering computationally expensive component subtrees, it's conceivable that this might take 200ms and result in 12 frames being dropped. Any animations controlled by JavaScript would appear to freeze during that time. If enough frames are dropped, the user will feel it.
+
+An example is responding to touches: if you are doing work across multiple frames on the JavaScript thread, you might notice a delay in responding to `TouchableOpacity`, for example. This is because the JavaScript thread is busy and cannot process the raw touch events sent over from the main thread. As a result, `TouchableOpacity` cannot react to the touch events and command the native view to adjust its opacity.
+
+### UI frame rate (main thread)
+
+You may have noticed that performance of native stack navigators (such as the [@react-navigation/native-stack](https://reactnavigation.org/docs/native-stack-navigator) provided by React Navigation) is better out of the box than JavaScript-based stack navigators. This is because the transition animations are executed on the native main UI thread, so they are not interrupted by frame drops on the JavaScript thread.
+
+Similarly, you can happily scroll up and down through a `ScrollView` when the JavaScript thread is locked up because the `ScrollView` lives on the main thread. The scroll events are dispatched to the JS thread, but their receipt is not necessary for the scroll to occur.
+
+## Common sources of performance problems
+
+### Running in development mode (`dev=true`)
+
+JavaScript thread performance suffers greatly when running in dev mode. This is unavoidable: a lot more work needs to be done at runtime to provide you with good warnings and error messages. Always make sure to test performance in [release builds](running-on-device.md#building-your-app-for-production).
+
+### Using `console.log` statements
+
+When running a bundled app, these statements can cause a big bottleneck in the JavaScript thread. This includes calls from debugging libraries such as [redux-logger](https://github.com/evgenyrodionov/redux-logger), so make sure to remove them before bundling. You can also use this [babel plugin](https://babeljs.io/docs/plugins/transform-remove-console/) that removes all the `console.*` calls. You need to install it first with `npm i babel-plugin-transform-remove-console --save-dev`, and then edit the `.babelrc` file under your project directory like this:
+
+```json
+{
+ "env": {
+ "production": {
+ "plugins": ["transform-remove-console"]
+ }
+ }
+}
+```
+
+This will automatically remove all `console.*` calls in the release (production) versions of your project.
+
+It is recommended to use the plugin even if no `console.*` calls are made in your project. A third party library could also call them.
+
+### `FlatList` rendering is too slow or scroll performance is bad for large lists
+
+If your [`FlatList`](flatlist.md) is rendering slowly, be sure that you've implemented [`getItemLayout`](flatlist.md#getitemlayout) to optimize rendering speed by skipping measurement of the rendered items.
+
+There are also other third-party list libraries that are optimized for performance, including [FlashList](https://github.com/shopify/flash-list) and [Legend List](https://github.com/legendapp/legend-list).
+
+### Dropping JS thread FPS because of doing a lot of work on the JavaScript thread at the same time
+
+"Slow Navigator transitions" is the most common manifestation of this, but there are other times this can happen. Using [`InteractionManager`](interactionmanager.md) can be a good approach, but if the user experience cost is too high to delay work during an animation, then you might want to consider [`LayoutAnimation`](layoutanimation.md).
+
+The [`Animated API`](animated.md) currently calculates each keyframe on-demand on the JavaScript thread unless you [set `useNativeDriver: true`](/blog/2017/02/14/using-native-driver-for-animated#how-do-i-use-this-in-my-app), while [`LayoutAnimation`](layoutanimation.md) leverages Core Animation and is unaffected by JS thread and main thread frame drops.
+
+One case for using this is animating in a modal (sliding down from top and fading in a translucent overlay) while initializing and perhaps receiving responses for several network requests, rendering the contents of the modal, and updating the view where the modal was opened from. See the [Animations guide](animations.md) for more information about how to use `LayoutAnimation`.
+
+**Caveats:**
+
+- `LayoutAnimation` only works for fire-and-forget animations ("static" animations) -- if it must be interruptible, you will need to use [`Animated`](animated.md).
+
+### Moving a view on the screen (scrolling, translating, rotating) drops UI thread FPS
+
+This is especially true on Android when you have text with a transparent background positioned on top of an image, or any other situation where alpha compositing would be required to re-draw the view on each frame. You will find that enabling `renderToHardwareTextureAndroid` can help with this significantly. For iOS, `shouldRasterizeIOS` is already enabled by default.
+
+Be careful not to overuse this or your memory usage could go through the roof. Profile your performance and memory usage when using these props. If you don't plan to move a view anymore, turn this property off.
+
+### Animating the size of an image drops UI thread FPS
+
+On iOS, each time you adjust the width or height of an [`Image` component](image.md) it is re-cropped and scaled from the original image. This can be very expensive, especially for large images. Instead, use the `transform: [{scale}]` style property to animate the size. An example of when you might do this is when you tap an image and zoom it in to full screen.
+
+### My TouchableX view isn't very responsive
+
+Sometimes, if we do an action in the same frame that we are adjusting the opacity or highlight of a component that is responding to a touch, we won't see that effect until after the `onPress` function has returned. This may occur if `onPress` sets a state that results in a heavy re-render and a few frames are dropped as a result. A solution to this is to wrap any action inside of your `onPress` handler in `requestAnimationFrame`:
+
+```tsx
+function handleOnPress() {
+ requestAnimationFrame(() => {
+ this.doExpensiveAction();
+ });
+}
+```
diff --git a/website/versioned_docs/version-0.86/permissionsandroid.md b/website/versioned_docs/version-0.86/permissionsandroid.md
new file mode 100644
index 00000000000..ec1f486ba37
--- /dev/null
+++ b/website/versioned_docs/version-0.86/permissionsandroid.md
@@ -0,0 +1,205 @@
+---
+id: permissionsandroid
+title: PermissionsAndroid
+---
+
+
+
Project with Native Code Required
+
The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on Permissions in the Expo documentation for the appropriate alternative.
+
+
+`PermissionsAndroid` provides access to Android M's new permissions model. The so-called "normal" permissions are granted by default when the application is installed as long as they appear in `AndroidManifest.xml`. However, "dangerous" permissions require a dialog prompt. You should use this module for those permissions.
+
+On devices before SDK version 23, the permissions are automatically granted if they appear in the manifest, so `check` should always result to `true` and `request` should always resolve to `PermissionsAndroid.RESULTS.GRANTED`.
+
+If a user has previously turned off a permission that you prompt for, the OS will advise your app to show a rationale for needing the permission. The optional `rationale` argument will show a dialog prompt only if necessary - otherwise the normal permission prompt will appear.
+
+### Example
+
+```SnackPlayer name=PermissionsAndroid%20Example&supportedPlatforms=android
+import React from 'react';
+import {
+ Button,
+ PermissionsAndroid,
+ StatusBar,
+ StyleSheet,
+ Text,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const requestCameraPermission = async () => {
+ try {
+ const granted = await PermissionsAndroid.request(
+ PermissionsAndroid.PERMISSIONS.CAMERA,
+ {
+ title: 'Cool Photo App Camera Permission',
+ message:
+ 'Cool Photo App needs access to your camera ' +
+ 'so you can take awesome pictures.',
+ buttonNeutral: 'Ask Me Later',
+ buttonNegative: 'Cancel',
+ buttonPositive: 'OK',
+ },
+ );
+ if (granted === PermissionsAndroid.RESULTS.GRANTED) {
+ console.log('You can use the camera');
+ } else {
+ console.log('Camera permission denied');
+ }
+ } catch (err) {
+ console.warn(err);
+ }
+};
+
+const App = () => (
+
+
+ Try permissions
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ paddingTop: StatusBar.currentHeight,
+ backgroundColor: '#ecf0f1',
+ padding: 8,
+ },
+ item: {
+ margin: 24,
+ fontSize: 18,
+ fontWeight: 'bold',
+ textAlign: 'center',
+ },
+});
+
+export default App;
+```
+
+### Permissions that require prompting the user
+
+Available as constants under `PermissionsAndroid.PERMISSIONS`:
+
+- `READ_CALENDAR`: 'android.permission.READ_CALENDAR'
+- `WRITE_CALENDAR`: 'android.permission.WRITE_CALENDAR'
+- `CAMERA`: 'android.permission.CAMERA'
+- `READ_CONTACTS`: 'android.permission.READ_CONTACTS'
+- `WRITE_CONTACTS`: 'android.permission.WRITE_CONTACTS'
+- `GET_ACCOUNTS`: 'android.permission.GET_ACCOUNTS'
+- `ACCESS_FINE_LOCATION`: 'android.permission.ACCESS_FINE_LOCATION'
+- `ACCESS_COARSE_LOCATION`: 'android.permission.ACCESS_COARSE_LOCATION'
+- `ACCESS_BACKGROUND_LOCATION`: 'android.permission.ACCESS_BACKGROUND_LOCATION'
+- `RECORD_AUDIO`: 'android.permission.RECORD_AUDIO'
+- `READ_PHONE_STATE`: 'android.permission.READ_PHONE_STATE'
+- `CALL_PHONE`: 'android.permission.CALL_PHONE'
+- `READ_CALL_LOG`: 'android.permission.READ_CALL_LOG'
+- `WRITE_CALL_LOG`: 'android.permission.WRITE_CALL_LOG'
+- `ADD_VOICEMAIL`: 'com.android.voicemail.permission.ADD_VOICEMAIL'
+- `USE_SIP`: 'android.permission.USE_SIP'
+- `PROCESS_OUTGOING_CALLS`: 'android.permission.PROCESS_OUTGOING_CALLS'
+- `BODY_SENSORS`: 'android.permission.BODY_SENSORS'
+- `SEND_SMS`: 'android.permission.SEND_SMS'
+- `RECEIVE_SMS`: 'android.permission.RECEIVE_SMS'
+- `READ_SMS`: 'android.permission.READ_SMS'
+- `RECEIVE_WAP_PUSH`: 'android.permission.RECEIVE_WAP_PUSH'
+- `RECEIVE_MMS`: 'android.permission.RECEIVE_MMS'
+- `READ_EXTERNAL_STORAGE`: 'android.permission.READ_EXTERNAL_STORAGE'
+- `WRITE_EXTERNAL_STORAGE`: 'android.permission.WRITE_EXTERNAL_STORAGE'
+- `BLUETOOTH_CONNECT`: 'android.permission.BLUETOOTH_CONNECT'
+- `BLUETOOTH_SCAN`: 'android.permission.BLUETOOTH_SCAN'
+- `BLUETOOTH_ADVERTISE`: 'android.permission.BLUETOOTH_ADVERTISE'
+- `ACCESS_MEDIA_LOCATION`: 'android.permission.ACCESS_MEDIA_LOCATION'
+- `ACCEPT_HANDOVER`: 'android.permission.ACCEPT_HANDOVER'
+- `ACTIVITY_RECOGNITION`: 'android.permission.ACTIVITY_RECOGNITION'
+- `ANSWER_PHONE_CALLS`: 'android.permission.ANSWER_PHONE_CALLS'
+- `READ_PHONE_NUMBERS`: 'android.permission.READ_PHONE_NUMBERS'
+- `UWB_RANGING`: 'android.permission.UWB_RANGING'
+- `BODY_SENSORS_BACKGROUND`: 'android.permission.BODY_SENSORS_BACKGROUND'
+- `READ_MEDIA_IMAGES`: 'android.permission.READ_MEDIA_IMAGES'
+- `READ_MEDIA_VIDEO`: 'android.permission.READ_MEDIA_VIDEO'
+- `READ_MEDIA_AUDIO`: 'android.permission.READ_MEDIA_AUDIO'
+- `POST_NOTIFICATIONS`: 'android.permission.POST_NOTIFICATIONS'
+- `NEARBY_WIFI_DEVICES`: 'android.permission.NEARBY_WIFI_DEVICES'
+- `READ_VOICEMAIL`: 'com.android.voicemail.permission.READ_VOICEMAIL',
+- `WRITE_VOICEMAIL`: 'com.android.voicemail.permission.WRITE_VOICEMAIL',
+
+### Result strings for requesting permissions
+
+Available as constants under `PermissionsAndroid.RESULTS`:
+
+- `GRANTED`: 'granted'
+- `DENIED`: 'denied'
+- `NEVER_ASK_AGAIN`: 'never_ask_again'
+
+---
+
+# Reference
+
+## Methods
+
+### `check()`
+
+```tsx
+static check(permission: Permission): Promise;
+```
+
+Returns a promise resolving to a boolean value as to whether the specified permissions has been granted.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---------- | ------ | -------- | ---------------------------- |
+| permission | string | Yes | The permission to check for. |
+
+---
+
+### `request()`
+
+```tsx
+static request(
+ permission: Permission,
+ rationale?: Rationale,
+): Promise;
+```
+
+Prompts the user to enable a permission and returns a promise resolving to a string value (see result strings above) indicating whether the user allowed or denied the request or does not want to be asked again.
+
+If `rationale` is provided, this function checks with the OS whether it is necessary to show a dialog explaining why the permission is needed (https://developer.android.com/training/permissions/requesting.html#explain) and then shows the system permission dialog.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---------- | ------ | -------- | -------------------------- |
+| permission | string | Yes | The permission to request. |
+| rationale | object | No | See `rationale` below. |
+
+**Rationale:**
+
+| Name | Type | Required | Description |
+| -------------- | ------ | -------- | -------------------------------- |
+| title | string | Yes | The title of the dialog. |
+| message | string | Yes | The message of the dialog. |
+| buttonPositive | string | Yes | The text of the positive button. |
+| buttonNegative | string | No | The text of the negative button. |
+| buttonNeutral | string | No | The text of the neutral button. |
+
+---
+
+### `requestMultiple()`
+
+```tsx
+static requestMultiple(
+ permissions: Permission[],
+): Promise<{[key in Permission]: PermissionStatus}>;
+```
+
+Prompts the user to enable multiple permissions in the same dialog and returns an object with the permissions as keys and strings as values (see result strings above) indicating whether the user allowed or denied the request or does not want to be asked again.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ----- | -------- | -------------------------------- |
+| permissions | array | Yes | Array of permissions to request. |
diff --git a/website/versioned_docs/version-0.86/pixelratio.md b/website/versioned_docs/version-0.86/pixelratio.md
new file mode 100644
index 00000000000..64e4eded49f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/pixelratio.md
@@ -0,0 +1,173 @@
+---
+id: pixelratio
+title: PixelRatio
+---
+
+`PixelRatio` gives you access to the device's pixel density and font scale.
+
+## Fetching a correctly sized image
+
+You should get a higher resolution image if you are on a high pixel density device. A good rule of thumb is to multiply the size of the image you display by the pixel ratio.
+
+```tsx
+const image = getImage({
+ width: PixelRatio.getPixelSizeForLayoutSize(200),
+ height: PixelRatio.getPixelSizeForLayoutSize(100),
+});
+;
+```
+
+## Pixel grid snapping
+
+In iOS, you can specify positions and dimensions for elements with arbitrary precision, for example 29.674825. But, ultimately the physical display only have a fixed number of pixels, for example 640×1136 for iPhone SE (1st generation) or 828×1792 for iPhone 11. iOS tries to be as faithful as possible to the user value by spreading one original pixel into multiple ones to trick the eye. The downside of this technique is that it makes the resulting element look blurry.
+
+In practice, we found out that developers do not want this feature and they have to work around it by doing manual rounding in order to avoid having blurry elements. In React Native, we are rounding all the pixels automatically.
+
+We have to be careful when to do this rounding. You never want to work with rounded and unrounded values at the same time as you're going to accumulate rounding errors. Having even one rounding error is deadly because a one pixel border may vanish or be twice as big.
+
+In React Native, everything in JavaScript and within the layout engine works with arbitrary precision numbers. It's only when we set the position and dimensions of the native element on the main thread that we round. Also, rounding is done relative to the root rather than the parent, again to avoid accumulating rounding errors.
+
+## Example
+
+```SnackPlayer name=PixelRatio%20Example
+import React from 'react';
+import {
+ Image,
+ PixelRatio,
+ ScrollView,
+ StyleSheet,
+ Text,
+ View,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const size = 50;
+const cat = {
+ uri: 'https://reactnative.dev/docs/assets/p_cat1.png',
+ width: size,
+ height: size,
+};
+
+const App = () => (
+
+
+
+
+ Current Pixel Ratio is:
+ {PixelRatio.get()}
+
+
+ Current Font Scale is:
+ {PixelRatio.getFontScale()}
+
+
+ On this device images with a layout width of
+ {size} px
+
+
+
+ require images with a pixel width of
+
+ {PixelRatio.getPixelSizeForLayoutSize(size)} px
+
+
+
+
+
+
+);
+
+const styles = StyleSheet.create({
+ scrollContainer: {
+ flex: 1,
+ },
+ container: {
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ value: {
+ fontSize: 24,
+ marginBottom: 12,
+ marginTop: 4,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `get()`
+
+```tsx
+static get(): number;
+```
+
+Returns the device pixel density. Some examples:
+
+- `PixelRatio.get() === 1`
+ - [mdpi Android devices](https://material.io/tools/devices/)
+- `PixelRatio.get() === 1.5`
+ - [hdpi Android devices](https://material.io/tools/devices/)
+- `PixelRatio.get() === 2`
+ - iPhone SE, 6S, 7, 8
+ - iPhone XR
+ - iPhone 11
+ - [xhdpi Android devices](https://material.io/tools/devices/)
+- `PixelRatio.get() === 3`
+ - iPhone 6S Plus, 7 Plus, 8 Plus
+ - iPhone X, XS, XS Max
+ - iPhone 11 Pro, 11 Pro Max
+ - Pixel, Pixel 2
+ - [xxhdpi Android devices](https://material.io/tools/devices/)
+- `PixelRatio.get() === 3.5`
+ - Nexus 6
+ - Pixel XL, Pixel 2 XL
+ - [xxxhdpi Android devices](https://material.io/tools/devices/)
+
+---
+
+### `getFontScale()`
+
+```tsx
+static getFontScale(): number;
+```
+
+Returns the scaling factor for font sizes. This is the ratio that is used to calculate the absolute font size, so any elements that heavily depend on that should use this to do calculations.
+
+- on Android value reflects the user preference set in **Settings > Display > Font size**
+- on iOS value reflects the user preference set in **Settings > Display & Brightness > Text Size**, value can also be updated in **Settings > Accessibility > Display & Text Size > Larger Text**
+
+If a font scale is not set, this returns the device pixel ratio.
+
+---
+
+### `getPixelSizeForLayoutSize()`
+
+```tsx
+static getPixelSizeForLayoutSize(layoutSize: number): number;
+```
+
+Converts a layout size (dp) to pixel size (px).
+
+Guaranteed to return an integer number.
+
+---
+
+### `roundToNearestPixel()`
+
+```tsx
+static roundToNearestPixel(layoutSize: number): number;
+```
+
+Rounds a layout size (dp) to the nearest layout size that corresponds to an integer number of pixels. For example, on a device with a PixelRatio of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to exactly (8.33 \* 3) = 25 pixels.
diff --git a/website/versioned_docs/version-0.86/platform-specific-code.md b/website/versioned_docs/version-0.86/platform-specific-code.md
new file mode 100644
index 00000000000..be82102e987
--- /dev/null
+++ b/website/versioned_docs/version-0.86/platform-specific-code.md
@@ -0,0 +1,138 @@
+---
+id: platform-specific-code
+title: Platform-Specific Code
+---
+
+When building a cross-platform app, you'll want to re-use as much code as possible. Scenarios may arise where it makes sense for the code to be different, for example you may want to implement separate visual components for Android and iOS.
+
+React Native provides two ways to organize your code and separate it by platform:
+
+- Using the [`Platform` module](platform-specific-code.md#platform-module).
+- Using [platform-specific file extensions](platform-specific-code.md#platform-specific-extensions).
+
+Certain components may have properties that work on one platform only. All of these props are annotated with `@platform` and have a small badge next to them on the website.
+
+## Platform module
+
+React Native provides a module that detects the platform in which the app is running. You can use the detection logic to implement platform-specific code. Use this option when only small parts of a component are platform-specific.
+
+```tsx
+import {Platform, StyleSheet} from 'react-native';
+
+const styles = StyleSheet.create({
+ height: Platform.OS === 'ios' ? 200 : 100,
+});
+```
+
+`Platform.OS` will be `ios` when running on iOS and `android` when running on Android.
+
+There is also a `Platform.select` method available that, given an object where keys can be one of `'ios' | 'android' | 'native' | 'default'`, returns the most fitting value for the platform you are currently running on. That is, if you're running on a phone, `ios` and `android` keys will take preference. If those are not specified, `native` key will be used and then the `default` key.
+
+```tsx
+import {Platform, StyleSheet} from 'react-native';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ ...Platform.select({
+ ios: {
+ backgroundColor: 'red',
+ },
+ android: {
+ backgroundColor: 'green',
+ },
+ default: {
+ // other platforms, web for example
+ backgroundColor: 'blue',
+ },
+ }),
+ },
+});
+```
+
+This will result in a container having `flex: 1` on all platforms, a red background color on iOS, a green background color on Android, and a blue background color on other platforms.
+
+Since it accepts `any` value, you can also use it to return platform-specific components, like below:
+
+```tsx
+const Component = Platform.select({
+ ios: () => require('ComponentIOS'),
+ android: () => require('ComponentAndroid'),
+})();
+
+;
+```
+
+```tsx
+const Component = Platform.select({
+ native: () => require('ComponentForNative'),
+ default: () => require('ComponentForWeb'),
+})();
+
+;
+```
+
+### Detecting the Android version
Android
+
+On Android, the `Platform` module can also be used to detect the version of the Android Platform in which the app is running:
+
+```tsx
+import {Platform} from 'react-native';
+
+if (Platform.Version === 25) {
+ console.log('Running on Nougat!');
+}
+```
+
+**Note**: `Version` is set to the Android API version not the Android OS version. To find a mapping please refer to [Android Version History](https://en.wikipedia.org/wiki/Android_version_history#Overview).
+
+### Detecting the iOS version
iOS
+
+On iOS, the `Version` is a result of `-[UIDevice systemVersion]`, which is a string with the current version of the operating system. An example of the system version is "10.3". For example, to detect the major version number on iOS:
+
+```tsx
+import {Platform} from 'react-native';
+
+const majorVersionIOS = parseInt(Platform.Version, 10);
+if (majorVersionIOS <= 9) {
+ console.log('Work around a change in behavior');
+}
+```
+
+## Platform-specific extensions
+
+When your platform-specific code is more complex, you should consider splitting the code out into separate files. React Native will detect when a file has a `.ios.` or `.android.` extension and load the relevant platform file when required from other components.
+
+For example, say you have the following files in your project:
+
+```shell
+BigButton.ios.js
+BigButton.android.js
+```
+
+You can then import the component as follows:
+
+```tsx
+import BigButton from './BigButton';
+```
+
+React Native will automatically pick up the right file based on the running platform.
+
+## Native-specific extensions (i.e. sharing code with NodeJS and Web)
+
+You can also use the `.native.js` extension when a module needs to be shared between NodeJS/Web and React Native but it has no Android/iOS differences. This is especially useful for projects that have common code shared among React Native and ReactJS.
+
+For example, say you have the following files in your project:
+
+```shell
+Container.js # picked up by webpack, Rollup or any other Web bundler
+Container.native.js # picked up by the React Native bundler for both Android and iOS (Metro)
+```
+
+You can still import it without the `.native` extension, as follows:
+
+```tsx
+import Container from './Container';
+```
+
+**Pro tip:** Configure your Web bundler to ignore `.native.js` extensions in order to avoid having unused code in your production bundle, thus reducing the final bundle size.
diff --git a/website/versioned_docs/version-0.86/platform.md b/website/versioned_docs/version-0.86/platform.md
new file mode 100644
index 00000000000..79f435ccd56
--- /dev/null
+++ b/website/versioned_docs/version-0.86/platform.md
@@ -0,0 +1,246 @@
+---
+id: platform
+title: Platform
+---
+
+## Example
+
+```SnackPlayer name=Platform%20API%20Example&supportedPlatforms=ios,android
+import React from 'react';
+import {Platform, StyleSheet, Text, ScrollView} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ return (
+
+
+
+ OS
+ {Platform.OS}
+ OS Version
+ {Platform.Version}
+ isTV
+ {Platform.isTV.toString()}
+ {Platform.OS === 'ios' && (
+ <>
+ isPad
+ {Platform.isPad.toString()}
+ >
+ )}
+ Constants
+
+ {JSON.stringify(Platform.constants, null, 2)}
+
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ value: {
+ fontWeight: '600',
+ padding: 4,
+ marginBottom: 8,
+ },
+ safeArea: {
+ flex: 1,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Properties
+
+### `constants`
+
+```tsx
+static constants: PlatformConstants;
+```
+
+Returns an object which contains all available common and specific constants related to the platform.
+
+**Properties:**
+
+|
Name
| Type | Optional | Description |
+| --------------------------------------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| isTesting | boolean | No | |
+| reactNativeVersion | object | No | Information about React Native version. Keys are `major`, `minor`, `patch` with optional `prerelease` and values are `number`s. |
+| Version
Android
| number | No | OS version constant specific to Android. |
+| Release
Android
| string | No | |
+| Serial
Android
| string | No | Hardware serial number of an Android device. |
+| Fingerprint
Android
| string | No | A string that uniquely identifies the build. |
+| Model
Android
| string | No | The end-user-visible name for the Android device. |
+| Brand
Android
| string | No | The consumer-visible brand with which the product/hardware will be associated. |
+| Manufacturer
Android
| string | No | The manufacturer of the Android device. |
+| ServerHost
Android
| string | Yes | |
+| uiMode
Android
| string | No | Possible values are: `'car'`, `'desk'`, `'normal'`,`'tv'`, `'watch'` and `'unknown'`. Read more about [Android ModeType](https://developer.android.com/reference/android/app/UiModeManager.html). |
+| forceTouchAvailable
iOS
| boolean | No | Indicate the availability of 3D Touch on a device. |
+| interfaceIdiom
iOS
| string | No | The interface type for the device. Read more about [UIUserInterfaceIdiom](https://developer.apple.com/documentation/uikit/uiuserinterfaceidiom). |
+| osVersion
iOS
| string | No | OS version constant specific to iOS. |
+| systemName
iOS
| string | No | OS name constant specific to iOS. |
+
+---
+
+### `isPad`
iOS
+
+```tsx
+static isPad: boolean;
+```
+
+Returns a boolean which defines if device is an iPad.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `isTV`
+
+```tsx
+static isTV: boolean;
+```
+
+Returns a boolean which defines if device is a TV.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `isVision`
+
+```tsx
+static isVision: boolean;
+```
+
+Returns a boolean which defines if device is an Apple Vision. _If you are using [Apple Vision Pro (Designed for iPad)](https://developer.apple.com/documentation/visionos/determining-whether-to-bring-your-app-to-visionos) `isVision` will be `false` but `isPad` will be `true`_
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `isTesting`
+
+```tsx
+static isTesting: boolean;
+```
+
+Returns a boolean which defines if application is running in Developer Mode with testing flag set.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `OS`
+
+```tsx
+static OS: 'android' | 'ios';
+```
+
+Returns string value representing the current OS.
+
+| Type |
+| -------------------------- |
+| enum(`'android'`, `'ios'`) |
+
+---
+
+### `Version`
+
+```tsx
+static Version: 'number' | 'string';
+```
+
+Returns the version of the OS.
+
+| Type |
+| ---------------------------------------------------------------------------------------------------- |
+| number
Android
string
iOS
|
+
+## Methods
+
+### `select()`
+
+```tsx
+static select(config: Record): T;
+```
+
+Returns the most fitting value for the platform you are currently running on.
+
+#### Parameters:
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ----------------------------- |
+| config | object | Yes | See config description below. |
+
+Select method returns the most fitting value for the platform you are currently running on. That is, if you're running on a phone, `android` and `ios` keys will take preference. If those are not specified, `native` key will be used and then the `default` key.
+
+The `config` parameter is an object with the following keys:
+
+- `android` (any)
+- `ios` (any)
+- `native` (any)
+- `default` (any)
+
+**Example usage:**
+
+```tsx
+import {Platform, StyleSheet} from 'react-native';
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ ...Platform.select({
+ android: {
+ backgroundColor: 'green',
+ },
+ ios: {
+ backgroundColor: 'red',
+ },
+ default: {
+ // other platforms, web for example
+ backgroundColor: 'blue',
+ },
+ }),
+ },
+});
+```
+
+This will result in a container having `flex: 1` on all platforms, a green background color on Android, a red background color on iOS, and a blue background color on other platforms.
+
+Since the value of the corresponding platform key can be of type `any`, [`select`](platform.md#select) method can also be used to return platform-specific components, like below:
+
+```tsx
+const Component = Platform.select({
+ ios: () => require('ComponentIOS'),
+ android: () => require('ComponentAndroid'),
+})();
+
+;
+```
+
+```tsx
+const Component = Platform.select({
+ native: () => require('ComponentForNative'),
+ default: () => require('ComponentForWeb'),
+})();
+
+;
+```
diff --git a/website/versioned_docs/version-0.86/platformcolor.md b/website/versioned_docs/version-0.86/platformcolor.md
new file mode 100644
index 00000000000..17371f76c26
--- /dev/null
+++ b/website/versioned_docs/version-0.86/platformcolor.md
@@ -0,0 +1,91 @@
+---
+id: platformcolor
+title: PlatformColor
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+```js
+PlatformColor(color1, [color2, ...colorN]);
+```
+
+You can use the `PlatformColor` function to access native colors on the target platform by supplying the native color’s corresponding string value. You pass a string to the `PlatformColor` function and, provided it exists on that platform, it will return the corresponding native color, which you can apply in any part of your application.
+
+If you pass more than one string value to the `PlatformColor` function, it will treat the first value as the default and the rest as fallback.
+
+```js
+PlatformColor('bogusName', 'linkColor');
+```
+
+Since native colors can be sensitive to themes and/or high contrast, this platform specific logic also translates inside your components.
+
+### Supported colors
+
+For a full list of the types of system colors supported, see:
+
+- Android:
+ - [R.attr](https://developer.android.com/reference/android/R.attr) - `?attr` prefix
+ - [R.color](https://developer.android.com/reference/android/R.color) - `@android:color` prefix
+- iOS (Objective-C and Swift notations):
+ - [UIColor Standard Colors](https://developer.apple.com/documentation/uikit/uicolor/standard_colors)
+ - [UIColor UI Element Colors](https://developer.apple.com/documentation/uikit/uicolor/ui_element_colors)
+
+#### Developer notes
+
+
+
+
+
+:::info
+If you’re familiar with design systems, another way of thinking about this is that `PlatformColor` lets you tap into the local design system's color tokens so your app can blend right in!
+:::
+
+
+
+
+## Example
+
+```SnackPlayer name=PlatformColor%20Example&supportedPlatforms=android,ios
+import React from 'react';
+import {Platform, PlatformColor, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => (
+
+
+ I am a special label color!
+
+
+);
+
+const styles = StyleSheet.create({
+ label: {
+ padding: 16,
+ fontWeight: '800',
+ ...Platform.select({
+ ios: {
+ color: PlatformColor('label'),
+ backgroundColor: PlatformColor('systemTealColor'),
+ },
+ android: {
+ color: PlatformColor('?android:attr/textColor'),
+ backgroundColor: PlatformColor('@android:color/holo_blue_bright'),
+ },
+ default: {color: 'black'},
+ }),
+ },
+ container: {
+ flex: 1,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+});
+
+export default App;
+```
+
+The string value provided to the `PlatformColor` function must match the string as it exists on the native platform where the app is running. In order to avoid runtime errors, the function should be wrapped in a platform check, either through a `Platform.OS === 'platform'` or a `Platform.select()`, as shown on the example above.
+
+:::note
+You can find a complete example that demonstrates proper, intended use of `PlatformColor` in [PlatformColorExample.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/PlatformColor/PlatformColorExample.js).
+:::
diff --git a/website/versioned_docs/version-0.86/pressable.md b/website/versioned_docs/version-0.86/pressable.md
new file mode 100644
index 00000000000..590c77db974
--- /dev/null
+++ b/website/versioned_docs/version-0.86/pressable.md
@@ -0,0 +1,268 @@
+---
+id: pressable
+title: Pressable
+---
+
+Pressable is a Core Component wrapper that can detect various stages of press interactions on any of its defined children.
+
+```tsx
+
+ I'm pressable!
+
+```
+
+## How it works
+
+On an element wrapped by `Pressable`:
+
+- [`onPressIn`](#onpressin) is called when a press is activated.
+- [`onPressOut`](#onpressout) is called when the press gesture is deactivated.
+
+After pressing [`onPressIn`](#onpressin), one of two things will happen:
+
+1. The person will remove their finger, triggering [`onPressOut`](#onpressout) followed by [`onPress`](#onpress).
+2. If the person leaves their finger longer than 500 milliseconds before removing it, [`onLongPress`](#onlongpress) is triggered. ([`onPressOut`](#onpressout) will still fire when they remove their finger.)
+
+
+
+Fingers are not the most precise instruments, and it is common for users to accidentally activate the wrong element or miss the activation area. To help, `Pressable` has an optional `HitRect` you can use to define how far a touch can register away from the wrapped element. Presses can start anywhere within a `HitRect`.
+
+`PressRect` allows presses to move beyond the element and its `HitRect` while maintaining activation and being eligible for a "press"—think of sliding your finger slowly away from a button you're pressing down on.
+
+:::note
+The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.
+:::
+
+
+
+
+ You can set HitRect with hitSlop and set PressRect with pressRetentionOffset.
+
+
+
+:::info
+`Pressable` uses React Native's `Pressability` API. For more information around the state machine flow of Pressability and how it works, check out the implementation for [Pressability](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Pressability/Pressability.js#L350).
+:::
+
+## Example
+
+```SnackPlayer name=Pressable
+import React, {useState} from 'react';
+import {Pressable, StyleSheet, Text, View} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [timesPressed, setTimesPressed] = useState(0);
+
+ let textLog = '';
+ if (timesPressed > 1) {
+ textLog = timesPressed + 'x onPress';
+ } else if (timesPressed > 0) {
+ textLog = 'onPress';
+ }
+
+ return (
+
+
+ {
+ setTimesPressed(current => current + 1);
+ }}
+ style={({pressed}) => [
+ {
+ backgroundColor: pressed ? 'rgb(210, 230, 255)' : 'white',
+ },
+ styles.wrapperCustom,
+ ]}>
+ {({pressed}) => (
+ {pressed ? 'Pressed!' : 'Press Me'}
+ )}
+
+
+ {textLog}
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ },
+ text: {
+ fontSize: 16,
+ },
+ wrapperCustom: {
+ borderRadius: 8,
+ padding: 6,
+ },
+ logBox: {
+ padding: 20,
+ margin: 10,
+ borderWidth: StyleSheet.hairlineWidth,
+ borderColor: '#f0f0f0',
+ backgroundColor: '#f9f9f9',
+ },
+});
+
+export default App;
+```
+
+## Props
+
+### `android_disableSound`
Android
+
+If true, doesn't play Android system sound on press.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+### `android_ripple`
Android
+
+Enables the Android ripple effect and configures its properties.
+
+| Type |
+| -------------------------------------- |
+| [RippleConfig](pressable#rippleconfig) |
+
+### `children`
+
+Either children or a function that receives a boolean reflecting whether the component is currently pressed.
+
+| Type |
+| ------------------------ |
+| [React Node](react-node) |
+
+### `unstable_pressDelay`
+
+Duration (in milliseconds) to wait after press down before calling `onPressIn`.
+
+| Type |
+| ------ |
+| number |
+
+### `delayLongPress`
+
+Duration (in milliseconds) from `onPressIn` before `onLongPress` is called.
+
+| Type | Default |
+| ------ | ------- |
+| number | `500` |
+
+### `disabled`
+
+Whether the press behavior is disabled.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+### `hitSlop`
+
+Sets additional distance outside of element in which a press can be detected.
+
+| Type |
+| ---------------------- |
+| [Rect](rect) or number |
+
+### `onHoverIn`
+
+Called when the hover is activated to provide visual feedback.
+
+| Type |
+| --------------------------------------------------------------------------------------------------------- |
+| `md ({ nativeEvent: [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) }) => void` |
+
+### `onHoverOut`
+
+Called when the hover is deactivated to undo visual feedback.
+
+| Type |
+| --------------------------------------------------------------------------------------------------------- |
+| `md ({ nativeEvent: [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) }) => void` |
+
+### `onLongPress`
+
+Called if the time after `onPressIn` lasts longer than 500 milliseconds. This time period can be customized with [`delayLongPress`](#delaylongpress).
+
+| Type |
+| ------------------------------------------------------ |
+| `md ({nativeEvent: [PressEvent](pressevent)}) => void` |
+
+### `onPress`
+
+Called after `onPressOut`.
+
+| Type |
+| ------------------------------------------------------ |
+| `md ({nativeEvent: [PressEvent](pressevent)}) => void` |
+
+### `onPressIn`
+
+Called immediately when a touch is engaged, before `onPressOut` and `onPress`.
+
+| Type |
+| ------------------------------------------------------ |
+| `md ({nativeEvent: [PressEvent](pressevent)}) => void` |
+
+### `onPressMove`
+
+Called when the press location moves.
+
+| Type |
+| ------------------------------------------------------ |
+| `md ({nativeEvent: [PressEvent](pressevent)}) => void` |
+
+### `onPressOut`
+
+Called when a touch is released.
+
+| Type |
+| ------------------------------------------------------ |
+| `md ({nativeEvent: [PressEvent](pressevent)}) => void` |
+
+### `pressRetentionOffset`
+
+Additional distance outside of this view in which a touch is considered a press before `onPressOut` is triggered.
+
+| Type | Default |
+| ---------------------- | -------------------------------------------- |
+| [Rect](rect) or number | `{bottom: 30, left: 20, right: 20, top: 20}` |
+
+### `style`
+
+Either view styles or a function that receives a boolean reflecting whether the component is currently pressed and returns view styles.
+
+| Type |
+| ----------------------------------------------------------------------------------------------- |
+| [View Style](view-style-props) or `md ({ pressed: boolean }) => [View Style](view-style-props)` |
+
+### `testOnly_pressed`
+
+Used only for documentation or testing (e.g. snapshot testing).
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+## Type Definitions
+
+### RippleConfig
+
+Ripple effect configuration for the `android_ripple` property.
+
+| Type |
+| ------ |
+| object |
+
+**Properties:**
+
+| Name | Type | Required | Description |
+| ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| color | [color](colors) | No | Defines the color of the ripple effect. |
+| borderless | boolean | No | Defines if ripple effect should not include border. |
+| radius | number | No | Defines the radius of the ripple effect. |
+| foreground | boolean | No | Set to true to add the ripple effect to the foreground of the view, instead of the background. This is useful if one of your child views has a background of its own, or you're e.g. displaying images, and you don't want the ripple to be covered by them. |
diff --git a/website/versioned_docs/version-0.86/pressevent.md b/website/versioned_docs/version-0.86/pressevent.md
new file mode 100644
index 00000000000..df81b875ddf
--- /dev/null
+++ b/website/versioned_docs/version-0.86/pressevent.md
@@ -0,0 +1,118 @@
+---
+id: pressevent
+title: PressEvent Object Type
+---
+
+`PressEvent` object is returned in the callback as a result of user press interaction, for example `onPress` in [Button](button) component.
+
+## Example
+
+```js
+{
+ changedTouches: [PressEvent],
+ identifier: 1,
+ locationX: 8,
+ locationY: 4.5,
+ pageX: 24,
+ pageY: 49.5,
+ target: 1127,
+ timestamp: 85131876.58868201,
+ touches: []
+}
+```
+
+## Keys and values
+
+### `changedTouches`
+
+Array of all PressEvents that have changed since the last event.
+
+| Type | Optional |
+| -------------------- | -------- |
+| array of PressEvents | No |
+
+### `force`
iOS
+
+Amount of force used during the 3D Touch press. Returns the float value in range from `0.0` to `1.0`.
+
+| Type | Optional |
+| ------ | -------- |
+| number | Yes |
+
+### `identifier`
+
+Unique numeric identifier assigned to the event.
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `locationX`
+
+Touch origin X coordinate inside touchable area (relative to the element).
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `locationY`
+
+Touch origin Y coordinate inside touchable area (relative to the element).
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `pageX`
+
+Touch origin X coordinate on the screen (relative to the root view).
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `pageY`
+
+Touch origin Y coordinate on the screen (relative to the root view).
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `target`
+
+The node id of the element receiving the PressEvent.
+
+| Type | Optional |
+| --------------------------- | -------- |
+| number, `null`, `undefined` | No |
+
+### `timestamp`
+
+Timestamp value when a PressEvent occurred. Value is represented in milliseconds.
+
+| Type | Optional |
+| ------ | -------- |
+| number | No |
+
+### `touches`
+
+Array of all current PressEvents on the screen.
+
+| Type | Optional |
+| -------------------- | -------- |
+| array of PressEvents | No |
+
+## Used by
+
+- [`Button`](button)
+- [`PanResponder`](panresponder)
+- [`Pressable`](pressable)
+- [`ScrollView`](scrollview)
+- [`Text`](text)
+- [`TextInput`](textinput)
+- [`TouchableHighlight`](touchablenativefeedback)
+- [`TouchableOpacity`](touchablewithoutfeedback)
+- [`TouchableNativeFeedback`](touchablenativefeedback)
+- [`TouchableWithoutFeedback`](touchablewithoutfeedback)
+- [`View`](view)
diff --git a/website/versioned_docs/version-0.86/profiling.md b/website/versioned_docs/version-0.86/profiling.md
new file mode 100644
index 00000000000..73cbed73ad1
--- /dev/null
+++ b/website/versioned_docs/version-0.86/profiling.md
@@ -0,0 +1,143 @@
+---
+id: profiling
+title: Profiling
+---
+
+Profiling is the process of analyzing an app's performance, resource usage, and behavior to identify potential bottlenecks or inefficiencies. It's worth making use of profiling tools to ensure your app works smoothly across different devices and conditions.
+
+For iOS, Instruments is an invaluable tool, and on Android you should learn to use the [Android Studio Profiler](profiling.md#profiling-android-ui-performance-with-system-tracing).
+
+But first, [**make sure that Development Mode is OFF!**](performance.md#running-in-development-mode-devtrue).
+
+## Profiling Android UI Performance with System Tracing
+
+Android supports 10k+ different phones and is generalized to support software rendering: the framework architecture and need to generalize across many hardware targets unfortunately means you get less for free relative to iOS. But sometimes, there are things you can improve -- and many times it's not native code's fault at all!
+
+The first step for debugging this jank is to answer the fundamental question of where your time is being spent during each 16ms frame. For that, we'll be using the [built-in System Tracing profiler in the Android Studio](https://developer.android.com/studio/profile).
+
+:::note
+The standalone `systrace` tool has been removed from Android platform-tools. Use the Android Studio Profiler instead, which provides the same functionality with a better user interface.
+:::
+
+### 1. Collecting a trace
+
+First, connect a device that exhibits the stuttering you want to investigate to your computer via USB. Open your project's `android` folder in Android Studio, select your device in the top right pane, and [run your project as profileable](https://developer.android.com/studio/profile#build-and-run).
+
+When your app is built as profileable and is running on the device, get your app to the point right before the navigation/animation you want to profile and start the ["Capture System Activities" task](https://developer.android.com/studio/profile#start-profiling) in the Android Studio Profiler pane.
+
+Once the trace starts collecting, perform the animation or interaction you care about. Then press "Stop recording". You can now [inspect the trace directly in the Android Studio](https://developer.android.com/studio/profile/jank-detection). Alternatively, you can select it in the "Past Recordings" pane, press "Export recording", and open it in a tool like [Perfetto](https://perfetto.dev/).
+
+### 2. Reading the trace
+
+After opening the trace in Android Studio or Perfetto, you should see something like this:
+
+
+
+:::note[Hint]
+Use the WASD keys to strafe and zoom.
+:::
+
+The exact UI might be different but the instructions below will apply regardless of the tool you're using.
+
+:::info[Enable VSync highlighting]
+Check this checkbox at the top right of the screen to highlight the 16ms frame boundaries:
+
+
+
+You should see zebra stripes as in the screenshot above. If you don't, try profiling on a different device: Samsung has been known to have issues displaying vsyncs while the Nexus series is generally pretty reliable.
+:::
+
+### 3. Find your process
+
+Scroll until you see (part of) the name of your package. In this case, I was profiling `com.facebook.adsmanager`, which shows up as `book.adsmanager` because of silly thread name limits in the kernel.
+
+On the left side, you'll see a set of threads which correspond to the timeline rows on the right. There are a few threads we care about for our purposes: the UI thread (which has your package name or the name UI Thread), `mqt_js`, and `mqt_native_modules`. If you're running on Android 5+, we also care about the Render Thread.
+
+- **UI Thread.** This is where standard android measure/layout/draw happens. The thread name on the right will be your package name (in my case book.adsmanager) or UI Thread. The events that you see on this thread should look something like this and have to do with `Choreographer`, `traversals`, and `DispatchUI`:
+
+ 
+
+- **JS Thread.** This is where JavaScript is executed. The thread name will be either `mqt_js` or `<...>` depending on how cooperative the kernel on your device is being. To identify it if it doesn't have a name, look for things like `JSCall`, `Bridge.executeJSCall`, etc:
+
+ 
+
+- **Native Modules Thread.** This is where native module calls (e.g. the `UIManager`) are executed. The thread name will be either `mqt_native_modules` or `<...>`. To identify it in the latter case, look for things like `NativeCall`, `callJavaModuleMethod`, and `onBatchComplete`:
+
+ 
+
+- **Bonus: Render Thread.** If you're using Android L (5.0) and up, you will also have a render thread in your application. This thread generates the actual OpenGL commands used to draw your UI. The thread name will be either `RenderThread` or `<...>`. To identify it in the latter case, look for things like `DrawFrame` and `queueBuffer`:
+
+ 
+
+## Identifying a culprit
+
+A smooth animation should look something like the following:
+
+
+
+Each change in color is a frame -- remember that in order to display a frame, all our UI work needs to be done by the end of that 16ms period. Notice that no thread is working close to the frame boundary. An application rendering like this is rendering at 60 FPS.
+
+If you noticed chop, however, you might see something like this:
+
+
+
+Notice that the JS thread is executing almost all the time, and across frame boundaries! This app is not rendering at 60 FPS. In this case, **the problem lies in JS**.
+
+You might also see something like this:
+
+
+
+In this case, the UI and render threads are the ones that have work crossing frame boundaries. The UI that we're trying to render on each frame is requiring too much work to be done. In this case, **the problem lies in the native views being rendered**.
+
+At this point, you'll have some very helpful information to inform your next steps.
+
+## Resolving JavaScript issues
+
+If you identified a JS problem, look for clues in the specific JS that you're executing. In the scenario above, we see `RCTEventEmitter` being called multiple times per frame. Here's a zoom-in of the JS thread from the trace above:
+
+
+
+This doesn't seem right. Why is it being called so often? Are they actually different events? The answers to these questions will probably depend on your product code. And many times, you'll want to look into [shouldComponentUpdate](https://react.dev/reference/react/Component#shouldcomponentupdate).
+
+## Resolving native UI Issues
+
+If you identified a native UI problem, there are usually two scenarios:
+
+1. the UI you're trying to draw each frame involves too much work on the GPU, or
+2. You're constructing new UI during the animation/interaction (e.g. loading in new content during a scroll).
+
+### Too much GPU work
+
+In the first scenario, you'll see a trace that has the UI thread and/or Render Thread looking like this:
+
+
+
+Notice the long amount of time spent in `DrawFrame` that crosses frame boundaries. This is time spent waiting for the GPU to drain its command buffer from the previous frame.
+
+To mitigate this, you should:
+
+- investigate using `renderToHardwareTextureAndroid` for complex, static content that is being animated/transformed (e.g. the `Navigator` slide/alpha animations)
+- make sure that you are **not** using `needsOffscreenAlphaCompositing`, which is disabled by default, as it greatly increases the per-frame load on the GPU in most cases.
+
+### Creating new views on the UI thread
+
+In the second scenario, you'll see something more like this:
+
+
+
+Notice that first the JS thread thinks for a bit, then you see some work done on the native modules thread, followed by an expensive traversal on the UI thread.
+
+There isn't a quick way to mitigate this unless you're able to postpone creating new UI until after the interaction, or you are able to simplify the UI you're creating. The react native team is working on an infrastructure level solution for this that will allow new UI to be created and configured off the main thread, allowing the interaction to continue smoothly.
+
+### Finding native CPU hotspots
+
+If the problem seems to be on the native side, you can use the [CPU hotspot profiler](https://developer.android.com/studio/profile/record-java-kotlin-methods) to get more details on what's happening. Open the Android Studio Profiler panel and select "Find CPU Hotspots (Java/Kotlin Method Recording)".
+
+:::info[Choose the Java/Kotlin recording]
+
+Make sure you select "Find CPU Hotspots **(Java/Kotlin Recording)**" rather than "Find CPU Hotspots (Callstack Sample)". They have similar icons but do different things.
+:::
+
+Perform the interactions and press "Stop recording". Recording is resource-intensive, so keep the interaction short. You can then either inspect the resulting trace in the Android Studio or export it and open it in an online tool like [Firefox Profiler](https://profiler.firefox.com/).
+
+Unlike System Trace, CPU hotspot profiling is slow so it won't give you accurate measurements. However, it should give you an idea of what native methods are being called, and where the time is being spent proportionally during each frame.
diff --git a/website/versioned_docs/version-0.86/progressbarandroid.md b/website/versioned_docs/version-0.86/progressbarandroid.md
new file mode 100644
index 00000000000..4f165d86c46
--- /dev/null
+++ b/website/versioned_docs/version-0.86/progressbarandroid.md
@@ -0,0 +1,131 @@
+---
+id: progressbarandroid
+title: '🗑️ ProgressBarAndroid'
+---
+
+:::warning Deprecated
+Use one of the [community packages](https://reactnative.directory/?search=progressbar) instead.
+:::
+
+Android-only React component used to indicate that the app is loading or there is some activity in the app.
+
+### Example
+
+```SnackPlayer name=ProgressBarAndroid&supportedPlatforms=android
+import React from 'react';
+import {View, StyleSheet, ProgressBarAndroid, Text} from 'react-native';
+
+const App = () => {
+ return (
+
+
+ Circle Progress Indicator
+
+
+
+ Horizontal Progress Indicator
+
+
+
+ Colored Progress Indicator
+
+
+
+ Fixed Progress Value
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ example: {
+ marginVertical: 24,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Props
+
+Inherits [View Props](view.md#props).
+
+### `animating`
+
+Whether to show the ProgressBar (true, the default) or hide it (false).
+
+| Type | Required |
+| ---- | -------- |
+| bool | No |
+
+---
+
+### `color`
+
+Color of the progress bar.
+
+| Type | Required |
+| ------------------ | -------- |
+| [color](colors.md) | No |
+
+---
+
+### `indeterminate`
+
+If the progress bar will show indeterminate progress. Note that this can only be false if styleAttr is Horizontal, and requires a `progress` value.
+
+| Type | Required |
+| ----------------- | -------- |
+| indeterminateType | No |
+
+---
+
+### `progress`
+
+The progress value (between 0 and 1).
+
+| Type | Required |
+| ------ | -------- |
+| number | No |
+
+---
+
+### `styleAttr`
+
+Style of the ProgressBar. One of:
+
+- Horizontal
+- Normal (default)
+- Small
+- Large
+- Inverse
+- SmallInverse
+- LargeInverse
+
+| Type | Required |
+| ----------------------------------------------------------------------------------------- | -------- |
+| enum('Horizontal', 'Normal', 'Small', 'Large', 'Inverse', 'SmallInverse', 'LargeInverse') | No |
+
+---
+
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type | Required |
+| ------ | -------- |
+| string | No |
diff --git a/website/versioned_docs/version-0.86/props.md b/website/versioned_docs/version-0.86/props.md
new file mode 100644
index 00000000000..490eb214632
--- /dev/null
+++ b/website/versioned_docs/version-0.86/props.md
@@ -0,0 +1,99 @@
+---
+id: props
+title: Props
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Most components can be customized when they are created, with different parameters. These created parameters are called `props`, short for properties.
+
+For example, one basic React Native component is the `Image`. When you create an image, you can use a prop named `source` to control what image it shows.
+
+```SnackPlayer name=Props
+import React from 'react';
+import {Image} from 'react-native';
+
+const Bananas = () => {
+ let pic = {
+ uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg',
+ };
+ return (
+
+ );
+};
+
+export default Bananas;
+```
+
+Notice the braces surrounding `{pic}` - these embed the variable `pic` into JSX. You can put any JavaScript expression inside braces in JSX.
+
+Your own components can also use `props`. This lets you make a single component that is used in many different places in your app, with slightly different properties in each place by referring to `props` in your `render` function. Here's an example:
+
+
+
+
+```SnackPlayer name=Props&ext=js
+import React from 'react';
+import {Text, View} from 'react-native';
+
+const Greeting = props => {
+ return (
+
+ Hello {props.name}!
+
+ );
+};
+
+const LotsOfGreetings = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default LotsOfGreetings;
+```
+
+
+
+
+```SnackPlayer name=Props&ext=tsx
+import React from 'react';
+import {Text, View} from 'react-native';
+
+type GreetingProps = {
+ name: string;
+};
+
+const Greeting = (props: GreetingProps) => {
+ return (
+
+ Hello {props.name}!
+
+ );
+};
+
+const LotsOfGreetings = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default LotsOfGreetings;
+```
+
+
+
+
+Using `name` as a prop lets us customize the `Greeting` component, so we can reuse that component for each of our greetings. This example also uses the `Greeting` component in JSX, similar to the [Core Components](intro-react-native-components). The power to do this is what makes React so cool - if you find yourself wishing that you had a different set of UI primitives to work with, you can invent new ones.
+
+The other new thing going on here is the [`View`](view.md) component. A [`View`](view.md) is useful as a container for other components, to help control style and layout.
+
+With `props` and the basic [`Text`](text.md), [`Image`](image.md), and [`View`](view.md) components, you can build a wide variety of static screens. To learn how to make your app change over time, you need to [learn about State](state.md).
diff --git a/website/versioned_docs/version-0.86/publishing-to-app-store.md b/website/versioned_docs/version-0.86/publishing-to-app-store.md
new file mode 100644
index 00000000000..98c0d9b9ae9
--- /dev/null
+++ b/website/versioned_docs/version-0.86/publishing-to-app-store.md
@@ -0,0 +1,59 @@
+---
+id: publishing-to-app-store
+title: Publishing to Apple App Store
+---
+
+The publishing process is the same as any other native iOS app, with some additional considerations to take into account.
+
+:::info
+If you are using Expo, read the Expo guide for [Deploying to App Stores](https://docs.expo.dev/distribution/app-stores/) to build and submit your app for the Apple App Store. This guide works with any React Native app to automate the deployment process.
+:::
+
+### 1. Configure release scheme
+
+Building an app for distribution in the App Store requires using the `Release` scheme in Xcode. Apps built for `Release` will automatically disable the in-app Dev Menu, which will prevent your users from inadvertently accessing the menu in production. It will also bundle the JavaScript locally, so you can put the app on a device and test whilst not connected to the computer.
+
+To configure your app to be built using the `Release` scheme, go to **Product** → **Scheme** → **Edit Scheme**. Select the **Run** tab in the sidebar, then set the Build Configuration dropdown to `Release`.
+
+
+
+#### Pro Tips
+
+The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
+
+```shell
+ if [ "${CONFIGURATION}" == "Debug" ]; then
+ export SKIP_BUNDLING=true
+ fi
+```
+
+### 2. Build app for release
+
+You can now build your app for release by tapping Cmd ⌘ + B or selecting **Product** → **Build** from the menu bar. Once built for release, you'll be able to distribute the app to beta testers and submit the app to the App Store.
+
+:::info
+You can also use the `React Native CLI` to perform this operation using the option `--mode` with the value `Release` (e.g. from the root of your project: `npm run ios -- --mode="Release"` or `yarn ios --mode Release`).
+:::
+
+Once you are done with the testing and ready to publish to App Store, follow along with this guide.
+
+- Launch your terminal, and navigate into the iOS folder of your app and type `open .`.
+- Double click on YOUR_APP_NAME.xcworkspace. It should launch Xcode.
+- Click on `Product` → `Archive`. Make sure to set the device to "Any iOS Device (arm64)".
+
+:::note
+Check your Bundle Identifier and make sure it is exactly same as the one you have created in the Identifiers in Apple Developer Dashboard.
+:::
+
+- After the archive is completed, in the archive window, click on `Distribute App`.
+- Click on `App Store Connect` now (if you want to publish in App Store).
+- Click `Upload` → Make sure all the checkboxes are selected, hit `Next`.
+- Choose between `Automatically manage signing` and `Manually manage signing` based on your needs.
+- Click on `Upload`.
+- Now you can find it in the App Store Connect under TestFlight.
+
+Now fill up the necessary information and in the Build Section, select the build of the app and click on `Save` → `Submit For Review`.
+
+### 3. Screenshots
+
+The Apple Store requires you have screenshots for the latest devices. The reference for such devices would be found [here](https://developer.apple.com/help/app-store-connect/reference/screenshot-specifications/). Note that screenshots for some display sizes are not required if they are provided for other sizes.
diff --git a/website/versioned_docs/version-0.86/pushnotificationios.md b/website/versioned_docs/version-0.86/pushnotificationios.md
new file mode 100644
index 00000000000..0cdecf3180a
--- /dev/null
+++ b/website/versioned_docs/version-0.86/pushnotificationios.md
@@ -0,0 +1,530 @@
+---
+id: pushnotificationios
+title: '🗑️ PushNotificationIOS'
+---
+
+:::warning Deprecated
+Use one of the [community packages](https://reactnative.directory/?search=notification) instead.
+:::
+
+
+
Projects with Native Code Only
+
The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on Notifications in the Expo documentation for the appropriate alternative.
+
+
+Handle notifications for your app, including scheduling and permissions.
+
+---
+
+## Getting Started
+
+To enable push notifications, [configure your notifications with Apple](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server) and your server-side system.
+
+Then, [enable remote notifications](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app#2980038) in your project. This will automatically enable the required settings.
+
+### Enable support for `register` events
+
+In your `AppDelegate.m`, add:
+
+```objectivec
+#import
+```
+
+Then implement the following in order to handle remote notification registration events:
+
+```objectivec
+- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
+{
+ // This will trigger 'register' events on PushNotificationIOS
+ [RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
+}
+- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
+{
+ // This will trigger 'registrationError' events on PushNotificationIOS
+ [RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
+}
+```
+
+### Handle notifications
+
+You'll need to implement `UNUserNotificationCenterDelegate` in your `AppDelegate`:
+
+```objectivec
+#import
+
+@interface YourAppDelegate ()
+@end
+```
+
+Set the delegate on app launch:
+
+```objectivec
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ ...
+ UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
+ center.delegate = self;
+
+ return YES;
+}
+```
+
+#### Foreground notifications
+
+Implement `userNotificationCenter:willPresentNotification:withCompletionHandler:` to handle notifications that arrive when the app is in the foreground. Use the completionHandler to determine if the notification will be shown to the user and notify `RCTPushNotificationManager` accordingly:
+
+```objectivec
+// Called when a notification is delivered to a foreground app.
+- (void)userNotificationCenter:(UNUserNotificationCenter *)center
+ willPresentNotification:(UNNotification *)notification
+ withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
+{
+ // This will trigger 'notification' and 'localNotification' events on PushNotificationIOS
+ [RCTPushNotificationManager didReceiveNotification:notification];
+ // Decide if and how the notification will be shown to the user
+ completionHandler(UNNotificationPresentationOptionNone);
+}
+```
+
+#### Background notifications
+
+Implement `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:` to handle when a notification is tapped, typically called for background notifications which the user taps to open the app. However, if you had set foreground notifications to be shown in `userNotificationCenter:willPresentNotification:withCompletionHandler:`, this method will also be invoked on foreground notifications when tapped. In this case, you should only notify `RCTPushNotificationManager` in one of these callbacks.
+
+If the tapped notification resulted in app launch, call `setInitialNotification:`. If the notification was not previously handled by `userNotificationCenter:willPresentNotification:withCompletionHandler:`, call `didReceiveNotification:` as well:
+
+```objectivec
+- (void) userNotificationCenter:(UNUserNotificationCenter *)center
+ didReceiveNotificationResponse:(UNNotificationResponse *)response
+ withCompletionHandler:(void (^)(void))completionHandler
+{
+ // This condition passes if the notification was tapped to launch the app
+ if ([response.actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier]) {
+ // Allow the notification to be retrieved on the JS side using getInitialNotification()
+ [RCTPushNotificationManager setInitialNotification:response.notification];
+ }
+ // This will trigger 'notification' and 'localNotification' events on PushNotificationIOS
+ [RCTPushNotificationManager didReceiveNotification:response.notification];
+ completionHandler();
+}
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `presentLocalNotification()`
+
+```tsx
+static presentLocalNotification(details: PresentLocalNotificationDetails);
+```
+
+Schedules a local notification for immediate presentation.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ------ | -------- | ----------- |
+| details | object | Yes | See below. |
+
+`details` is an object containing:
+
+- `alertTitle` : The text displayed as the title of the notification alert.
+- `alertBody` : The message displayed in the notification alert.
+- `userInfo` : An object containing additional notification data (optional).
+- `category` : The category of this notification, required for actionable notifications (optional). e.g. notifications with additional actions such as Reply or Like.
+- `applicationIconBadgeNumber` The number to display as the app's icon badge. The default value of this property is 0, which means that no badge is displayed (optional).
+- `isSilent` : If true, the notification will appear without sound (optional).
+- `soundName` : The sound played when the notification is fired (optional).
+- `alertAction` : DEPRECATED. This was used for iOS's legacy UILocalNotification.
+
+---
+
+### `scheduleLocalNotification()`
+
+```tsx
+static scheduleLocalNotification(details: ScheduleLocalNotificationDetails);
+```
+
+Schedules a local notification for future presentation.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | ------ | -------- | ----------- |
+| details | object | Yes | See below. |
+
+`details` is an object containing:
+
+- `alertTitle` : The text displayed as the title of the notification alert.
+- `alertBody` : The message displayed in the notification alert.
+- `fireDate` : When the notification will be fired. Schedule notifications using either `fireDate` or `fireIntervalSeconds`, with `fireDate` taking precedence.
+- `fireIntervalSeconds` : Seconds from now to display the notification.
+- `userInfo` : An object containing additional notification data (optional).
+- `category` : The category of this notification, required for actionable notifications (optional). e.g. notifications with additional actions such as Reply or Like.
+- `applicationIconBadgeNumber` The number to display as the app's icon badge. The default value of this property is 0, which means that no badge is displayed (optional).
+- `isSilent` : If true, the notification will appear without sound (optional).
+- `soundName` : The sound played when the notification is fired (optional).
+- `alertAction` : DEPRECATED. This was used for iOS's legacy UILocalNotification.
+- `repeatInterval` : DEPRECATED. Use `fireDate` or `fireIntervalSeconds` instead.
+
+---
+
+### `cancelAllLocalNotifications()`
+
+```tsx
+static cancelAllLocalNotifications();
+```
+
+Cancels all scheduled local notifications.
+
+---
+
+### `removeAllDeliveredNotifications()`
+
+```tsx
+static removeAllDeliveredNotifications();
+```
+
+Removes all delivered notifications from Notification Center.
+
+---
+
+### `getDeliveredNotifications()`
+
+```tsx
+static getDeliveredNotifications(callback: (notifications: Object[]) => void);
+```
+
+Provides a list of the app’s notifications that are currently displayed in Notification Center.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ------------------------------------------------------------ |
+| callback | function | Yes | Function which receives an array of delivered notifications. |
+
+A delivered notification is an object containing:
+
+- `identifier` : The identifier of this notification.
+- `title` : The title of this notification.
+- `body` : The body of this notification.
+- `category` : The category of this notification (optional).
+- `userInfo` : An object containing additional notification data (optional).
+- `thread-id` : The thread identifier of this notification, if it has one.
+
+---
+
+### `removeDeliveredNotifications()`
+
+```tsx
+static removeDeliveredNotifications(identifiers: string[]);
+```
+
+Removes the specified notifications from Notification Center.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ----- | -------- | ---------------------------------- |
+| identifiers | array | Yes | Array of notification identifiers. |
+
+---
+
+### `setApplicationIconBadgeNumber()`
+
+```tsx
+static setApplicationIconBadgeNumber(num: number);
+```
+
+Sets the badge number for the app icon on the Home Screen.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------ | ------ | -------- | ------------------------------ |
+| number | number | Yes | Badge number for the app icon. |
+
+---
+
+### `getApplicationIconBadgeNumber()`
+
+```tsx
+static getApplicationIconBadgeNumber(callback: (num: number) => void);
+```
+
+Gets the current badge number for the app icon on the Home Screen.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | -------------------------------------------------- |
+| callback | function | Yes | Function which processes the current badge number. |
+
+---
+
+### `cancelLocalNotifications()`
+
+```tsx
+static cancelLocalNotifications(userInfo: Object);
+```
+
+Cancels any scheduled local notifications which match the fields in the provided `userInfo`.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | ------ | -------- | ----------- |
+| userInfo | object | No | |
+
+---
+
+### `getScheduledLocalNotifications()`
+
+```tsx
+static getScheduledLocalNotifications(
+ callback: (notifications: ScheduleLocalNotificationDetails[]) => void,
+);
+```
+
+Gets the list of local notifications that are currently scheduled.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ---------------------------------------------------------------------------- |
+| callback | function | Yes | Function which processes an array of objects describing local notifications. |
+
+---
+
+### `addEventListener()`
+
+```tsx
+static addEventListener(
+ type: PushNotificationEventName,
+ handler:
+ | ((notification: PushNotification) => void)
+ | ((deviceToken: string) => void)
+ | ((error: {message: string; code: number; details: any}) => void),
+);
+```
+
+Attaches a listener to notification events including local notifications, remote notifications, and notification registration results.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ------- | -------- | -------- | ----------------------------------- |
+| type | string | Yes | Event type to listen to. See below. |
+| handler | function | Yes | Listener. |
+
+Valid events types include:
+
+- `notification` : Fired when a remote notification is received. The handler will be invoked with an instance of `PushNotificationIOS`. This will handle notifications that arrive in the foreground or were tapped to open the app from the background.
+- `localNotification` : Fired when a local notification is received. The handler will be invoked with an instance of `PushNotificationIOS`. This will handle notifications that arrive in the foreground or were tapped to open the app from the background.
+- `register`: Fired when the user registers successfully for remote notifications. The handler will be invoked with a hex string representing the deviceToken.
+- `registrationError`: Fired when the user fails to register for remote notifications. Typically occurs due to APNS issues or if the device is a simulator. The handler will be invoked with `{message: string, code: number, details: any}`.
+
+---
+
+### `removeEventListener()`
+
+```tsx
+static removeEventListener(
+ type: PushNotificationEventName,
+);
+```
+
+Removes the event listener. Do this in `componentWillUnmount` to prevent memory leaks.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ---- | ------ | -------- | ------------------------------------------------- |
+| type | string | Yes | Event type. See `addEventListener()` for options. |
+
+---
+
+### `requestPermissions()`
+
+```tsx
+static requestPermissions(permissions?: PushNotificationPermissions[]);
+```
+
+Requests notification permissions from iOS, prompting the user with a dialog box. By default, this will request all notification permissions, but you can optionally specify which permissions to request. The following permissions are supported:
+
+- `alert`
+- `badge`
+- `sound`
+
+If a map is provided to the method, only the permissions with truthy values will be requested.
+
+This method returns a promise that will resolve when the user accepts or rejects the request, or if the permissions were previously rejected. The promise resolves to the state of the permissions after the request has been completed.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| ----------- | ----- | -------- | ---------------------- |
+| permissions | array | No | alert, badge, or sound |
+
+---
+
+### `abandonPermissions()`
+
+```tsx
+static abandonPermissions();
+```
+
+Unregister for all remote notifications received via Apple Push Notification service.
+
+You should call this method in rare circumstances only, such as when a new version of the app removes support for all types of remote notifications. Users can temporarily prevent apps from receiving remote notifications through the Settings app. Apps unregistered through this method can always re-register.
+
+---
+
+### `checkPermissions()`
+
+```tsx
+static checkPermissions(
+ callback: (permissions: PushNotificationPermissions) => void,
+);
+```
+
+Check which push permissions are currently enabled.
+
+**Parameters:**
+
+| Name | Type | Required | Description |
+| -------- | -------- | -------- | ----------- |
+| callback | function | Yes | See below. |
+
+`callback` will be invoked with a `permissions` object:
+
+- `alert: boolean`
+- `badge: boolean`
+- `sound: boolean`
+
+---
+
+### `getInitialNotification()`
+
+```tsx
+static getInitialNotification(): Promise;
+```
+
+This method returns a promise. If the app was launched by a push notification, this promise resolves to an object of type `PushNotificationIOS` for the notification that was tapped. Otherwise, it resolves to `null`.
+
+---
+
+### `getAuthorizationStatus()`
+
+```tsx
+static getAuthorizationStatus(): Promise;
+```
+
+This method returns a promise that resolves to the current notification authorization status. See [UNAuthorizationStatus](https://developer.apple.com/documentation/usernotifications/unauthorizationstatus?language=objc) for possible values.
+
+---
+
+### `finish()`
+
+```tsx
+finish(result: string);
+```
+
+This method is available for remote notifications that have been received via [`application:didReceiveRemoteNotification:fetchCompletionHandler:`](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application?language=objc). However, this is superseded by `UNUserNotificationCenterDelegate` and will no longer be invoked if both `application:didReceiveRemoteNotification:fetchCompletionHandler:` and the newer handlers from `UNUserNotificationCenterDelegate` are implemented.
+
+If for some reason you're still relying on `application:didReceiveRemoteNotification:fetchCompletionHandler:`, you'll need to set up event handling on the iOS side:
+
+```objectivec
+- (void) application:(UIApplication *)application
+ didReceiveRemoteNotification:(NSDictionary *)userInfo
+ fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler
+{
+ [RCTPushNotificationManager didReceiveRemoteNotification:userInfo fetchCompletionHandler:handler];
+}
+```
+
+Call `finish()` to execute the native completion handlers once you're done handling the notification on the JS side. When calling this block, pass in the fetch result value that best describes the results of your operation. For a list of possible values, see `PushNotificationIOS.FetchResult`.
+
+If you're using `application:didReceiveRemoteNotification:fetchCompletionHandler:`, you _must_ call this handler and should do so as soon as possible. See the [official documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application?language=objc) for more details.
+
+---
+
+### `getMessage()`
+
+```tsx
+getMessage(): string | Object;
+```
+
+An alias for `getAlert` to get the notification's main message string.
+
+---
+
+### `getSound()`
+
+```tsx
+getSound(): string;
+```
+
+Gets the sound string from the `aps` object. This will be `null` for local notifications.
+
+---
+
+### `getCategory()`
+
+```tsx
+getCategory(): string;
+```
+
+Gets the category string from the `aps` object.
+
+---
+
+### `getAlert()`
+
+```tsx
+getAlert(): string | Object;
+```
+
+Gets the notification's main message from the `aps` object. Also see the alias: `getMessage()`.
+
+---
+
+### `getContentAvailable()`
+
+```tsx
+getContentAvailable(): number;
+```
+
+Gets the content-available number from the `aps` object.
+
+---
+
+### `getBadgeCount()`
+
+```tsx
+getBadgeCount(): number;
+```
+
+Gets the badge count number from the `aps` object.
+
+---
+
+### `getData()`
+
+```tsx
+getData(): Object;
+```
+
+Gets the data object on the notification.
+
+---
+
+### `getThreadID()`
+
+```tsx
+getThreadID();
+```
+
+Gets the thread ID on the notification.
diff --git a/website/versioned_docs/version-0.86/react-native-devtools.md b/website/versioned_docs/version-0.86/react-native-devtools.md
new file mode 100644
index 00000000000..ecf338014a0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/react-native-devtools.md
@@ -0,0 +1,214 @@
+---
+id: react-native-devtools
+title: React Native DevTools
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+React Native DevTools is our modern debugging experience for React Native. Purpose-built from the ground up, it aims to be fundamentally more integrated, correct, and reliable than previous debugging methods.
+
+
+
+React Native DevTools is designed for debugging React app concerns, and not to replace native tools. If you want to inspect React Native’s underlying platform layers (for example, while developing a Native Module), please use the debugging tools available in Android Studio and Xcode (see [Debugging Native Code](/docs/debugging-native-code)).
+
+
+**💡 Compatibility** — released in 0.76
+
+React Native DevTools supports all React Native apps running Hermes. It replaces the previous Flipper, Experimental Debugger, and Hermes debugger (Chrome) frontends.
+
+It is not possible to set up React Native DevTools with any older versions of React Native.
+
+- **Chrome Browser DevTools — unsupported**
+ - Connecting to React Native via `chrome://inspect` is no longer supported. Features may not work correctly, as the latest versions of Chrome DevTools (which are built to match the latest browser capabilities and APIs) have not been tested, and this frontend lacks our customisations. Instead, we ship a supported version with React Native DevTools.
+- **Visual Studio Code — unsupported** (pre-existing)
+ - Third party extensions such as [Expo Tools](https://github.com/expo/vscode-expo) and [Radon IDE](https://ide.swmansion.com/) may have improved compatibility, but are not directly supported by the React team.
+
+
+
+**💡 Feedback & FAQs**
+
+We want the tooling you use to debug React across all platforms to be reliable, familiar, simple, and cohesive. All the features described on this page are built with these principles in mind, and we also want to offer more capabilities in future.
+
+We are actively iterating on the future of React Native DevTools, and have created a centralized [GitHub discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/819) to keep track of issues, frequently asked questions, and feedback.
+
+
+
+## Core features
+
+React Native DevTools is based on the Chrome DevTools frontend. If you have a web development background, its features should be familiar. As a starting point, we recommend browsing the [Chrome DevTools docs](https://developer.chrome.com/docs/devtools) which contain full guides as well as video resources.
+
+### Console
+
+
+
+The Console panel allows you to view and filter messages, evaluate JavaScript, inspect object properties, and more.
+
+[Console features reference | Chrome DevTools](https://developer.chrome.com/docs/devtools/console/reference)
+
+#### Useful tips
+
+- If your app has a lot of logs, use the filter box or change the log levels that are shown.
+- Watch values over time with [Live Expressions](https://developer.chrome.com/docs/devtools/console/live-expressions).
+- Persist messages across reloads with [Preserve Logs](https://developer.chrome.com/docs/devtools/console/reference#persist).
+- Use Ctrl + L to clear the console view.
+
+### Sources & breakpoints
+
+
+
+The Sources panel allows you to view the source files in your app and register breakpoints. Use a breakpoint to define a line of code where your app should pause — allowing you to inspect the live state of the program and incrementally step through code.
+
+[Pause your code with breakpoints | Chrome DevTools](https://developer.chrome.com/docs/devtools/javascript/breakpoints)
+
+:::tip
+
+#### Mini-guide
+
+Breakpoints are a fundamental tool in your debugging toolkit!
+
+1. Navigate to a source file using the sidebar or Cmd ⌘+P / Ctrl+P.
+2. Click in the line number column next to a line of code to add a breakpoint.
+3. Use the navigation controls at the top right to [step through code](https://developer.chrome.com/docs/devtools/javascript/reference#stepping) when paused.
+
+:::
+
+#### Useful tips
+
+- A "Paused in Debugger" overlay appears when your app is paused. Tap it to resume.
+- Pay attention to the right-hand panels when on a breakpoint, which allow you to inspect the current scope and call stack, and set watch expressions.
+- Use a `debugger;` statement to quickly set a breakpoint from your text editor. This will reach the device immediately via Fast Refresh.
+- There are multiple kinds of breakpoints! For example, [Conditional Breakpoints and Logpoints](https://developer.chrome.com/docs/devtools/javascript/breakpoints#overview).
+
+### Network
Since 0.83
+
+
+
+The Network panel allows you to view and inspect the network requests made by your app. Logged requests provide detailed metadata such as timings and headers sent/received, as well as response previews.
+
+Network requests are recorded automatically when DevTools is open. We support most features from Chrome, with some exceptions. See more below.
+
+
+💡 Network event coverage, Expo support
+
+**Which network events are captured?**
+
+Today, we record all network calls through `fetch()`, `XMLHttpRequest`, and `` — with support for custom networking libraries, such as Expo Fetch, coming later.
+
+**Expo Network differences**
+
+Because of this, apps using Expo will continue to see the "Expo Network" panel — a separate implementation by the Expo framework which will log these additional request sources but has slightly reduced features.
+
+- Coverage for Expo-specific network events.
+- No request initiator support.
+- No Performance panel integration.
+
+We're working with Expo to integrate Expo Fetch and third party networking libraries with our new Network inspection pipeline in future releases.
+
+**Unimplemented features**
+
+At launch, these are the features we don't yet support in React Native:
+
+- WebSocket events
+- Network response mocking
+- Simulated network throttling
+
+
+
+
+💡 Response previews buffer size
+
+If you are inspecting a large volume of response data, please note that response previews are cached in an on-device buffer with a maximum size of 100MB. This means we may evict response previews (but not metadata) if the cache becomes too large, oldest request first.
+
+
+
+#### Useful tips
+
+- Use the Initiator tab to see the call stack of where a network request was initiated in your app.
+- Network events will also be shown in the Network track in the Performance panel.
+
+### Performance
Since 0.83
+
+
+
+Performance tracing allows you to record a performance session within your app to understand how your JavaScript code is running and what operations took the most time. In React Native, we show JavaScript execution, React Performance tracks, Network events, and custom [User Timings](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing), rendered in a single performance timeline.
+
+#### Useful tips
+
+- Use [Annotations](https://developer.chrome.com/docs/devtools/performance/annotations) (shift-drag) to label and mark up a performance trace — useful before [downloading and sharing](https://developer.chrome.com/docs/devtools/performance/save-trace) a trace with a teammate. Annotations also provide a quick way to gauge time spans in **seconds**.
+- Use the [`PerformanceObserver` API](./global-PerformanceObserver.md) in your app to observe performance events at runtime — useful if you want to capture performance telemetry.
+
+#### Learn more
+
+- [React Performance tracks](https://react.dev/reference/dev-tools/react-performance-tracks)
+- [Performance APIs > User Timings | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Performance_API/User_timing)
+- ["Debug Like a Senior — React Native Performance Panel" | Software Mansion](https://blog.swmansion.com/react-native-debugging-new-performance-panel-in-react-native-0-83-21ca90871f6d)
+
+### Memory
+
+
+
+The Memory panel allows you to take a heap snapshot and view the memory usage of your JavaScript code over time.
+
+[Record heap snapshots | Chrome DevTools](https://developer.chrome.com/docs/devtools/memory-problems/heap-snapshots)
+
+#### Useful tips
+
+- Use Cmd ⌘+F / Ctrl+F to filter for specific objects in the heap.
+- Taking an [allocation timeline report](https://developer.chrome.com/docs/devtools/memory-problems/allocation-profiler) can be useful to see memory usage over time as a graph, to identify possible memory leaks.
+
+## React DevTools features
+
+In the integrated Components and Profiler panels, you'll find all the features of the [React DevTools](https://react.dev/learn/react-developer-tools) browser extension. These work seamlessly in React Native DevTools.
+
+### React Components
+
+
+
+The React Components panel allows you to inspect and update the rendered React component tree.
+
+- Hover or select an element in DevTools to highlight it on the device.
+- To locate an element in DevTools, click the top-left "Select element" button, then tap any element in the app.
+
+#### Useful tips
+
+- Props and state on a component can be viewed and modified at runtime using the right hand panel.
+- Components optimized with [React Compiler](https://react.dev/learn/react-compiler) will be annotated with a "Memo ✨" badge.
+
+:::tip
+
+#### Protip: Highlight re-renders
+
+Re-renders can be a significant contributor to performance issues in React apps. DevTools can highlight component re-renders as they happen.
+
+- To enable, click the View Settings (`⚙︎`) icon and check "Highlight updates when components render".
+
+
+
+:::
+
+### React Profiler
+
+
+
+The React Profiler panel allows you to record performance profiles to understand the timing of component renders and React commits.
+
+For more info, see the [original 2018 guide](https://legacy.reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html#reading-performance-data) (note that parts of this may be outdated).
+
+## Reconnecting DevTools
+
+Occasionally, DevTools might disconnect from the target device. This can happen if:
+
+- The app is closed.
+- The app is rebuilt (a new native build is installed).
+- The app crashes on the native side.
+- The dev server (Metro) is quit.
+- A physical device is disconnected.
+
+On disconnect, a dialog will be shown with the message "Debugging connection was closed".
+
+
+
+From here, you can either:
+
+- **Dismiss**: Select the close (`×`) icon or click outside the dialog to return to the DevTools UI in the last state before disconnection.
+- **Reconnect**: Select "Reconnect DevTools", having addressed the reason for disconnection.
diff --git a/website/versioned_docs/version-0.86/react-native-gradle-plugin.md b/website/versioned_docs/version-0.86/react-native-gradle-plugin.md
new file mode 100644
index 00000000000..8f045197d59
--- /dev/null
+++ b/website/versioned_docs/version-0.86/react-native-gradle-plugin.md
@@ -0,0 +1,195 @@
+---
+id: react-native-gradle-plugin
+title: React Native Gradle Plugin
+---
+
+This guide describes how to configure the **React Native Gradle Plugin** (often referred as RNGP), when building your React Native application for Android.
+
+## Using the plugin
+
+The React Native Gradle Plugin is distributed as a separate NPM package which is installed automatically with `react-native`.
+
+The plugin is **already configured** for new projects created using `npx react-native init`. You don't need to do any extra steps to install it if you created your app with this command.
+
+If you're integrating React Native into an existing project, please refer to [the corresponding page](/docs/next/integration-with-existing-apps#configuring-gradle): it contains specific instructions on how to install the plugin.
+
+## Configuring the plugin
+
+By default, the plugin will work **out of the box** with sensible defaults. You should refer to this guide and customize the behavior only if you need it.
+
+To configure the plugin you can modify the `react` block, inside your `android/app/build.gradle`:
+
+```groovy
+apply plugin: "com.facebook.react"
+
+/**
+ * This is the configuration block to customize your React Native Android app.
+ * By default you don't need to apply any configuration, just uncomment the lines you need.
+ */
+react {
+ // Custom configuration goes here.
+}
+```
+
+Each configuration key is described below:
+
+### `root`
+
+This is the root folder of your React Native project, i.e. where the `package.json` file lives. Default is `..`. You can customize it as follows:
+
+```groovy
+root = file("../")
+```
+
+### `reactNativeDir`
+
+This is the folder where the `react-native` package lives. Default is `../node_modules/react-native`.
+If you're in a monorepo or using a different package manager, you can use adjust `reactNativeDir` to your setup.
+
+You can customize it as follows:
+
+```groovy
+reactNativeDir = file("../node_modules/react-native")
+```
+
+### `codegenDir`
+
+This is the folder where the `react-native-codegen` package lives. Default is `../node_modules/react-native-codegen`.
+If you're in a monorepo or using a different package manager, you can adjust `codegenDir` to your setup.
+
+You can customize it as follows:
+
+```groovy
+codegenDir = file("../node_modules/@react-native/codegen")
+```
+
+### `cliFile`
+
+This is the entrypoint file for the React Native CLI. Default is `../node_modules/react-native/cli.js`.
+The entrypoint file is needed as the plugin needs to invoke the CLI for bundling and creating your app.
+
+If you're in a monorepo or using a different package manager, you can adjust `cliFile` to your setup.
+You can customize it as follows:
+
+```groovy
+cliFile = file("../node_modules/react-native/cli.js")
+```
+
+### `debuggableVariants`
+
+This is the list of variants that are debuggable (see [using variants](#using-variants) for more context on variants).
+
+By default the plugin is considering as `debuggableVariants` only `debug`, while `release` is not. If you have other
+variants (like `staging`, `lite`, etc.) you'll need to adjust this accordingly.
+
+Variants that are listed as `debuggableVariants` will not come with a shipped bundle, so you'll need Metro to run them.
+
+You can customize it as follows:
+
+```groovy
+debuggableVariants = ["liteDebug", "prodDebug"]
+```
+
+### `nodeExecutableAndArgs`
+
+This is the list of node command and arguments that should be invoked for all the scripts. By default is `[node]` but can be customized to add extra flags as follows:
+
+```groovy
+nodeExecutableAndArgs = ["node"]
+```
+
+### `bundleCommand`
+
+This is the name of the `bundle` command to be invoked when creating the bundle for your app. That's useful if you're using [RAM Bundles](https://reactnative.dev/docs/0.74/ram-bundles-inline-requires). By default is `bundle` but can be customized to add extra flags as follows:
+
+```groovy
+bundleCommand = "ram-bundle"
+```
+
+### `bundleConfig`
+
+This is the path to a configuration file that will be passed to `bundle --config ` if provided. Default is empty (no config file will be probided). More information on bundling config files can be found [on the CLI documentation](https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle). Can be customized as follow:
+
+```groovy
+bundleConfig = file(../rn-cli.config.js)
+```
+
+### `bundleAssetName`
+
+This is the name of the bundle file that should be generated. Default is `index.android.bundle`. Can be customized as follow:
+
+```groovy
+bundleAssetName = "MyApplication.android.bundle"
+```
+
+### `entryFile`
+
+The entry file used for bundle generation. The default is to search for `index.android.js` or `index.js`. Can be customized as follow:
+
+```groovy
+entryFile = file("../js/MyApplication.android.js")
+```
+
+### `extraPackagerArgs`
+
+A list of extra flags that will be passed to the `bundle` command. The list of available flags is in [the CLI documentation](https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle). Default is empty. Can be customized as follows:
+
+```groovy
+extraPackagerArgs = []
+```
+
+### `hermesCommand`
+
+The path to the `hermesc` command (the Hermes Compiler). React Native comes with a version of the Hermes compiler bundled with it, so you generally won't be needing to customize this. The plugin will use the correct compiler for your system by default.
+
+### `hermesFlags`
+
+The list of flags to pass to `hermesc`. By default is `["-O", "-output-source-map"]`. You can customize it as follows
+
+```groovy
+hermesFlags = ["-O", "-output-source-map"]
+```
+
+### `enableBundleCompression`
+
+Whether the Bundle Asset should be compressed when packaged into a `.apk`, or not.
+
+Disabling compression for the `.bundle` allows it to be directly memory-mapped to RAM, hence improving startup time - at the cost of a larger resulting app size on disk. Please note that the `.apk` download size will be mostly unaffected as the `.apk` files are compressed before downloading
+
+By default this is disabled, and you should not turn it on, unless you're really concerned about disk space for your application.
+
+## Using Flavors & Build Variants
+
+When building Android apps, you might want to use [custom flavors](https://developer.android.com/studio/build/build-variants#product-flavors) to have different versions of your app starting from the same project.
+
+Please refer to the [official Android guide](https://developer.android.com/studio/build/build-variants) to configure custom build types (like `staging`) or custom flavors (like `full`, `lite`, etc.).
+By default new apps are created with two build types (`debug` and `release`) and no custom flavors.
+
+The combination of all the build types and all the flavors generates a set of **build variants**. For instance for `debug`/`staging`/`release` build types and `full`/`lite` you will have 6 build variants: `fullDebug`, `fullStaging`, `fullRelease` and so on.
+
+If you're using custom variants beyond `debug` and `release`, you need to instruct the React Native Gradle Plugin specifying which of your variants are **debuggable** using the [`debuggableVariants`](#debuggablevariants) configuration as follows:
+
+```diff
+apply plugin: "com.facebook.react"
+
+react {
++ debuggableVariants = ["fullStaging", "fullDebug"]
+}
+```
+
+This is necessary because the plugin will skip the JS bundling for all the `debuggableVariants`: you'll need Metro to run them. For example, if you list `fullStaging` in the `debuggableVariants`, you won't be able to publish it to a store as it will be missing the bundle.
+
+## What is the plugin doing under the hood?
+
+The React Native Gradle Plugin is responsible for configuring your Application build to ship React Native applications to production.
+The plugin is also used inside 3rd party libraries, to run the [Codegen](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/codegen.md) used for the New Architecture.
+
+Here is a summary of the plugin responsibilities:
+
+- Add a `createBundleJsAndAssets` task for every non debuggable variant, that is responsible of invoking the `bundle`, `hermesc` and `compose-source-map` commands.
+- Setting up the proper version of the `com.facebook.react:react-android` and `com.facebook.react:hermes-android` dependency, reading the React Native version from the `package.json` of `react-native`.
+- Setting up the proper Maven repositories (Maven Central, Google Maven Repo, JSC local Maven repo, etc.) needed to consume all the necessary Maven Dependencies.
+- Setting up the NDK to let you build apps that are using the New Architecture.
+- Setting up the `buildConfigFields` so that you can know at runtime if Hermes or the New Architecture are enabled.
+- Setting up the Metro DevServer Port as an Android resource so the app knows on which port to connect.
+- Invoking the [React Native Codegen](https://github.com/reactwg/react-native-new-architecture/blob/main/docs/codegen.md) if a library or app is using the Codegen for the New Architecture.
diff --git a/website/versioned_docs/version-0.86/react-node.md b/website/versioned_docs/version-0.86/react-node.md
new file mode 100644
index 00000000000..d703d1c1429
--- /dev/null
+++ b/website/versioned_docs/version-0.86/react-node.md
@@ -0,0 +1,13 @@
+---
+id: react-node
+title: React Node Object Type
+---
+
+A React Node is one of the following types:
+
+- Boolean (which is ignored)
+- `null` or `undefined` (which is ignored)
+- Number
+- String
+- A React element (result of JSX)
+- An array of any of the above, possibly a nested one
diff --git a/website/versioned_docs/version-0.86/rect.md b/website/versioned_docs/version-0.86/rect.md
new file mode 100644
index 00000000000..6a5d5db6444
--- /dev/null
+++ b/website/versioned_docs/version-0.86/rect.md
@@ -0,0 +1,50 @@
+---
+id: rect
+title: Rect Object Type
+---
+
+`Rect` accepts numeric pixel values to describe how far to extend a rectangular area. These values are added to the original area's size to expand it.
+
+## Example
+
+```js
+{
+ bottom: 20,
+ left: null,
+ right: undefined,
+ top: 50
+}
+```
+
+## Keys and values
+
+### `bottom`
+
+| Type | Required |
+| --------------------------- | -------- |
+| number, `null`, `undefined` | No |
+
+### `left`
+
+| Type | Required |
+| --------------------------- | -------- |
+| number, `null`, `undefined` | No |
+
+### `right`
+
+| Type | Required |
+| --------------------------- | -------- |
+| number, `null`, `undefined` | No |
+
+### `top`
+
+| Type | Required |
+| --------------------------- | -------- |
+| number, `null`, `undefined` | No |
+
+## Used by
+
+- [`Image`](image)
+- [`Pressable`](pressable)
+- [`Text`](text)
+- [`TouchableWithoutFeedback`](touchablewithoutfeedback)
diff --git a/website/versioned_docs/version-0.86/refreshcontrol.md b/website/versioned_docs/version-0.86/refreshcontrol.md
new file mode 100644
index 00000000000..7f7faab6744
--- /dev/null
+++ b/website/versioned_docs/version-0.86/refreshcontrol.md
@@ -0,0 +1,167 @@
+---
+id: refreshcontrol
+title: RefreshControl
+---
+
+This component is used inside a ScrollView or ListView to add pull to refresh functionality. When the ScrollView is at `scrollY: 0`, swiping down triggers an `onRefresh` event.
+
+## Example
+
+```SnackPlayer name=RefreshControl&supportedPlatforms=ios,android
+import React from 'react';
+import {RefreshControl, ScrollView, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [refreshing, setRefreshing] = React.useState(false);
+
+ const onRefresh = React.useCallback(() => {
+ setRefreshing(true);
+ setTimeout(() => {
+ setRefreshing(false);
+ }, 2000);
+ }, []);
+
+ return (
+
+
+
+ }>
+ Pull down to see RefreshControl indicator
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ scrollView: {
+ flex: 1,
+ backgroundColor: 'pink',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+});
+
+export default App;
+```
+
+:::note
+`refreshing` is a controlled prop, this is why it needs to be set to `true` in the `onRefresh` function otherwise the refresh indicator will stop immediately.
+:::
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view.md#props).
+
+---
+
+###
Required
**`refreshing`**
+
+Whether the view should be indicating an active refresh.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `colors`
Android
+
+The colors (at least one) that will be used to draw the refresh indicator.
+
+| Type |
+| ---------------------------- |
+| array of [colors](colors.md) |
+
+---
+
+### `enabled`
Android
+
+Whether the pull to refresh functionality is enabled.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `true` |
+
+---
+
+### `onRefresh`
+
+Called when the view starts refreshing.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `progressBackgroundColor`
Android
+
+The background color of the refresh indicator.
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `progressViewOffset`
+
+Progress view top offset.
+
+| Type | Default |
+| ------ | ------- |
+| number | `0` |
+
+---
+
+### `size`
Android
+
+Size of the refresh indicator.
+
+| Type | Default |
+| ---------------------------- | ----------- |
+| enum(`'default'`, `'large'`) | `'default'` |
+
+---
+
+### `tintColor`
iOS
+
+The color of the refresh indicator.
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `title`
iOS
+
+The title displayed under the refresh indicator.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `titleColor`
iOS
+
+The color of the refresh indicator title.
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
diff --git a/website/versioned_docs/version-0.86/releases/release-levels.md b/website/versioned_docs/version-0.86/releases/release-levels.md
new file mode 100644
index 00000000000..b42f21c45a5
--- /dev/null
+++ b/website/versioned_docs/version-0.86/releases/release-levels.md
@@ -0,0 +1,66 @@
+---
+id: release-levels
+title: Release Levels
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+React Native provides the community with the ability to adopt individual new features as soon as their design and implementation are nearly complete, even before they are included in a stable release. This approach is known as **release levels**.
+
+You can configure the release level of React Native so that your React Native instance will initialize with Feature Flags set to either `EXPERIMENTAL`, `CANARY`, or `STABLE` modes.
+
+:::note
+This approach is similar to [Canary and Experimental releases in React](https://react.dev/blog/2023/05/03/react-canaries), but with a key difference: regardless of the release level, the same version of React JS and React Native code is used.
+React Native is also not using `@canary` or `@experimental` NPM tags, as release levels are available for both stable and nightly releases of React Native.
+:::
+
+Moreover, setting the release level to `EXPERIMENTAL` or `CANARY` will **not** result in consuming `react@nightly` or `react@canary` due to how react-native is consuming the React version ([you can read more about it here](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/README.md#react--react-native-versions)).
+
+## When to Use Each Release Level
+
+- **`STABLE`**:
+ - Use for all production apps and libraries that do not need early access to unreleased features.
+ - This is the default level for stable and nightly releases.
+- **`CANARY`:**
+ - Use if you are a framework author, advanced app developer, or need to test or adopt new features before they are released in stable.
+ - Not recommended for production or user-facing applications.
+- **`EXPERIMENTAL`:**
+ - Use only for testing and providing feedback for new features in the early stages of development
+ - Not recommended for production or user-facing applications.
+
+## How to initialize React Native using Canary & Experimental
+
+### Android
+
+The `DefaultNewArchitectureEntryPoint` class now has a `releaseLevel` property (default: `STABLE`).
+The feature flag system uses this property to select the appropriate set of feature flags for the chosen release level.
+
+```kotlin title="Example usage"
+DefaultNewArchitectureEntryPoint.releaseLevel = ReleaseLevel.CANARY
+DefaultNewArchitectureEntryPoint.load()
+```
+
+The build system generates different feature flag override classes for each release level, ensuring the correct features are enabled for each stage.
+
+### iOS
+
+The `RCTReactNativeFactory` class now has an initializer that accepts a `releaseLevel` parameter. The feature flag setup uses this parameter to select the correct feature flag overrides.
+
+
+
+
+```objc title="AppDelegate.mm"
+[[RCTReactNativeFactory alloc] initWithDelegate:delegate releaseLevel:Canary];
+```
+
+
+
+
+```swift title="AppDelegate.swift"
+let factory = RCTReactNativeFactory(delegate: delegate, releaseLevel: RCTReleaseLevel.Canary)
+```
+
+
+
+
+The system ensures that only one release level is active per app instance, and will crash if multiple factories are created with different release levels.
diff --git a/website/versioned_docs/version-0.86/releases/releases.md b/website/versioned_docs/version-0.86/releases/releases.md
new file mode 100644
index 00000000000..c6a9bb52c6e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/releases/releases.md
@@ -0,0 +1,33 @@
+---
+id: releases
+title: Releases Overview
+---
+
+import ReleasesTable from '@site/src/components/releases/ReleasesTable';
+
+New React Native releases are shipped **every two months**, usually resulting in six (6) new minors per year.
+
+Below is the schedule and current status of recent and upcoming React Native releases:
+
+
+
+The different support level presented in the table are defined as such:
+
+- **Future**
+ - After a new version branch gets cut, creating new Release Candidates to allow the community to test the upcoming version is very important. New RC releases are done at a high pace, as soon as viable.
+- **Active**
+ - Stable releases in active support receive frequent updates. Latest stable has the highest priority, and at the start of its stable cycle (right after .0 is released) multiple patches will be done as soon as possible to stabilize the version and ensure a good upgrade experience to the community.
+- **End of Cycle**
+ - A version in this support bracket will receive less patches, unless some important regressions need to be addressed. Once a next version becomes the new latest stable, before the version in EoC moves over into Unsupported one last patch released will be produced with the latest receive pick requests.
+- **Unsupported**
+ - When a version is in the unsupported stage, no new released are to be expected. Only very important regressions might create exceptions to this rule; it is recommended that codebases using an unsupported version upgrade as soon as possible.
+
+## Commitment to Stability
+
+In order to support users upgrading React Native versions, we’re committed to maintain the **latest 3 minor series** (e.g. 0.78.x, 0.77.x and 0.76.x when 0.78 is the latest release).
+
+For those releases we’ll be publishing regular updates and bug fixes.
+
+You can read more about our support policy on [the react-native-releases working group](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md).
+
+More information on our versioning, and what we consider a breaking change is available in our [versioning policy](./releases/versioning-policy) page.
diff --git a/website/versioned_docs/version-0.86/releases/versioning-policy.md b/website/versioned_docs/version-0.86/releases/versioning-policy.md
new file mode 100644
index 00000000000..1b37c94bdc2
--- /dev/null
+++ b/website/versioned_docs/version-0.86/releases/versioning-policy.md
@@ -0,0 +1,111 @@
+---
+title: Versioning Policy
+---
+
+This page describes the versioning policy we follow for the `react-native` package.
+
+We test each version of React Native thoroughly, both with manual and automated tests, to ensure the quality doesn't regress.
+
+The `stable` channel of React Native follows the 0.x.y release policy described below.
+
+React Native also offers a `nightly` release channel to encourage early feedback on experimental features.
+
+This page describes our approach to version numbers for `react-native` and for packages under the `@react-native` scope.
+
+## Stable Release Versions
+
+React Native releases stable versions at a regular cadence.
+
+We follow the 0.x.y versioning schema:
+
+- Breaking changes will be shipped in a new minor version, i.e. we increment the x number (e.g.: 0.78.0 to 0.79.0).
+- New features and APIs will also be shipped in a new minor version, i.e. we increment the x number (e.g.: 0.78.0 to 0.79.0).
+- Critical bug fixes will be shipped in a new patch version, i.e. we increment the y number (e.g.: 0.78.1 to 0.78.2).
+
+Stable releases are shipped regularly, with the latest tagged as `latest` on NPM.
+
+A series of releases under the same minor number is called a **minor series** (e.g. 0.76.x is the minor series for 0.76.0, 0.76.1, 0.76.2, etc.).
+
+You can read more about our **commitment to stability** in [the releases page](./).
+
+### Breaking changes
+
+Breaking changes are inconvenient for everyone, and we’re trying to minimize them to the bare minimum. All the breaking changes we ship in each stable release will be highlighted in:
+
+- The _Breaking_ and the _Removed_ section of [the React Native Changelog](https://github.com/facebook/react-native/blob/main/CHANGELOG.md)
+- Each release blogpost in the _Breaking Changes_ section
+
+For each breaking change we’re committed to explaining the reasoning behind it, provide a replacement API if possible, and minimize the impact on final users.
+
+### What is a breaking change?
+
+We consider a breaking change for React Native:
+
+- An incompatible API change (i.e. an API that is changed or removed so that your code won’t compile/run anymore due to that change). Examples:
+ - Changes of any JS/Java/Kotlin/Obj-c/C++ APIs that would require your code to be changed in order to compile.
+ - Changes inside `@react-native/codegen` that are not backward compatible.
+- A significant behavior/runtime change. Example:
+ - The layout logic of a prop is changed drastically.
+- A significant change in the development experience. Example:
+ - A debugging feature is entirely removed.
+- A major bump of any of our transitive dependencies. Examples:
+ - Bumping React from 18.x to 19.x
+ - Bumping the Target SDK on Android from 34 to 35).
+- A reduction of any of our supported platform versions. Examples:
+ - Bumping min SDK on Android from 21 to 23
+ - Bumping the min iOS version to 15.1.
+
+We don’t consider those changes to be breaking:
+
+- Modifying APIs starting with `unstable_` prefix: These APIs expose experimental features, and we are not confident on their final shape. By releasing these with an `unstable_` prefix, we can iterate faster and get to a stable API sooner.
+- Changes to private or internal APIs: These APIs are often prefixed with either `internal_` , `private_` or living inside a `internal/` or `private/` folder/package. While some of those APIs might have public visibility due to tooling constraints, we don’t consider them part of our public API, so we’ll be changing them without previous notice.
+ - Similarly, If you access internal property names like `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED` or `__reactInternalInstance$uk43rzhitjg`, there are no guarantees. You are on your own.
+ - Classes annotated with `@FrameworkAPI` are also considered internal
+- Changes to tooling/development APIs: Some public APIs of React Native are reserved for integration with frameworks and other tools. For example, some of the Metro APIs or React Native DevTools APIs are supposed to be used only by other frameworks or tools. Changes to those APIs are discussed directly with the affected tools and are not considered breaking changes (we won’t be communicating them broadly in the release blogposts).
+- Development warnings: Since warnings don’t affect runtime behavior, we may add new warnings or modify existing warnings in between any versions.
+
+If we expect a change to cause broad problems in the community, we will still do our best to provide a gradual migration path for the ecosystem.
+
+### Deprecation Cycles
+
+As we keep on developing and evolving React Native, we write new APIs and sometimes we need to deprecate existing ones. Those APIs will go through a deprecation cycle.
+
+Once an API is deprecated, it will remain available **also** for the **following** stable releases.
+
+For example: if an API is deprecated in React Native 0.76.x, it will still be available in 0.77.x and won’t be removed sooner than React Native 0.78.x.
+
+Sometimes we decide to keep a deprecated API for a longer time, if we feel that the ecosystem needs more time to migrate away from it. For those APIs we generally provide warnings to help users migrate away from them.
+
+## Release channels
+
+React Native relies on a thriving open source community to file bug reports, open pull requests, and submit RFCs. To encourage feedback we do support several release channels.
+
+:::note
+This section will be most relevant to developers who work on frameworks, libraries, or developer tooling. Developers who use React Native primarily to build user-facing applications should not need to worry about release channels other than latest.
+:::
+
+### latest
+
+`latest` is for stable, semver React Native releases. It’s what you get when you install React Native from npm. This is the channel you’re already using today. User-facing applications that consume React Native directly use this channel.
+
+We publish a newer minor series of React Native regularly, and we update the `latest` tag to reflect the latest stable version.
+
+### next
+
+Before we declare a new React Native release stable, we publish a series of **release candidate**, starting from RC0. Those versions are pre-release versions (following the versioning schema `0.79.0-rc.0`) and are tagged as `next` on NPM.
+
+When a new branch cut happens, and RCs start to get published on NPM and GitHub, it’s a good idea to test your library/framework against a `next` version of React Native.
+
+That will ensure that your project will keep on working well with the upcoming versions of React Native.
+
+However, do not use prereleases/RCs in user-facing applications directly as they’re not considered production ready.
+
+### nightly
+
+We also publish a `nightly` release channel. Nightlies are published every day starting from the `main` branch of [facebook/react-native](https://github.com/facebook/react-native). Nightlies are considered unstable versions of React Native and are not recommended for production use.
+
+Nightlies follow the versioning schema as `0.80.0-nightly--` where `` is the date of the nightly and `` is the SHA of the commit that was used to publish this nightly.
+
+The nightly releases are provided for testing purposes only, and we provide no guarantees that behavior won’t change between nightlies. They do not follow the semver protocol that we use for releases from latest/next.
+
+It is a good idea to set up a CI workflow to test your library against a react-native@nightly version every day, to make sure your library will keep on working with future releases.
diff --git a/website/versioned_docs/version-0.86/roottag.md b/website/versioned_docs/version-0.86/roottag.md
new file mode 100644
index 00000000000..541724b9365
--- /dev/null
+++ b/website/versioned_docs/version-0.86/roottag.md
@@ -0,0 +1,74 @@
+---
+id: roottag
+title: RootTag
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+`RootTag` is an opaque identifier assigned to the native root view of your React Native surface — i.e. the `ReactRootView` or `RCTRootView` instance for Android or iOS respectively. In short, it is a surface identifier.
+
+## When to use a RootTag?
+
+For most React Native developers, you likely won’t need to deal with `RootTag`s.
+
+`RootTag`s are useful for when an app renders **multiple React Native root views** and you need to handle native API calls differently depending on the surface. An example of this is when an app is using native navigation and each screen is a separate React Native root view.
+
+In native navigation, every React Native root view is rendered in a platform’s navigation view (e.g., `Activity` for Android, `UINavigationViewController` for iOS). By this, you are able to leverage the navigation paradigms of the platform such as native look and feel and navigation transitions. The functionality to interact with the native navigation APIs can be exposed to React Native via a [native module](https://reactnative.dev/docs/next/native-modules-intro).
+
+For example, to update the title bar of a screen, you would call the navigation module’s API `setTitle("Updated Title")`, but it would need to know which screen in the stack to update. A `RootTag` is necessary here to identify the root view and its hosting container.
+
+Another use case for `RootTag` is when your app needs to attribute a certain JavaScript call to native based on its originating root view. A `RootTag` is necessary to differentiate the source of the call from different surfaces.
+
+## How to access the RootTag... if you need it
+
+In versions 0.65 and below, RootTag is accessed via a [legacy context](https://github.com/facebook/react-native/blob/v0.64.1/Libraries/ReactNative/AppContainer.js#L56). To prepare React Native for Concurrent features coming in React 18 and beyond, we are migrating to the latest [Context API](https://react.dev/reference/react/createContext) via `RootTagContext` in 0.66. Version 0.65 supports both the legacy context and the recommended `RootTagContext` to allow developers time to migrate their call-sites. See the breaking changes summary.
+
+How to access `RootTag` via the `RootTagContext`.
+
+```js
+import {RootTagContext} from 'react-native';
+import NativeAnalytics from 'native-analytics';
+import NativeNavigation from 'native-navigation';
+
+function ScreenA() {
+ const rootTag = useContext(RootTagContext);
+
+ const updateTitle = title => {
+ NativeNavigation.setTitle(rootTag, title);
+ };
+
+ const handleOneEvent = () => {
+ NativeAnalytics.logEvent(rootTag, 'one_event');
+ };
+
+ // ...
+}
+
+class ScreenB extends React.Component {
+ static contextType: typeof RootTagContext = RootTagContext;
+
+ updateTitle(title) {
+ NativeNavigation.setTitle(this.context, title);
+ }
+
+ handleOneEvent() {
+ NativeAnalytics.logEvent(this.context, 'one_event');
+ }
+
+ // ...
+}
+```
+
+Learn more about the Context API for [classes](https://react.dev/reference/react/Component#static-contexttype) and [hooks](https://react.dev/reference/react/useContext) from the React docs.
+
+### Breaking Change in 0.65
+
+`RootTagContext` was formerly named `unstable_RootTagContext` and changed to `RootTagContext` in 0.65. Please update any usages of `unstable_RootTagContext` in your codebase.
+
+### Breaking Change in 0.66
+
+The legacy context access to `RootTag` will be removed and replaced by `RootTagContext`. Beginning in 0.65, we encourage developers to proactively migrate `RootTag` accesses to `RootTagContext`.
+
+## Future Plans
+
+With the new React Native architecture progressing, there will be future iterations to `RootTag`, with the intention to keep the `RootTag` type opaque and prevent thrash in React Native codebases. Please do not rely on the fact that RootTag currently aliases to a number! If your app relies on RootTags, keep an eye on our version change logs, which you can find [here](https://github.com/facebook/react-native/blob/main/CHANGELOG.md).
diff --git a/website/versioned_docs/version-0.86/running-on-device.md b/website/versioned_docs/version-0.86/running-on-device.md
new file mode 100644
index 00000000000..a7569e13b3e
--- /dev/null
+++ b/website/versioned_docs/version-0.86/running-on-device.md
@@ -0,0 +1,457 @@
+---
+id: running-on-device
+title: Running On Device
+hide_table_of_contents: true
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+It's always a good idea to test your app on an actual device before releasing it to your users. This document will guide you through the necessary steps to run your React Native app on a device and to get it ready for production.
+
+:::tip
+If you used `create-expo-app` to set up your project, you can run your app on a device in Expo Go by scanning the QR code that is displayed when you run `npm start`. Refer to the Expo guide for [running your project on your device](https://docs.expo.dev/get-started/expo-go/) for more information.
+:::
+
+
+
+
+## Running your app on Android devices
+
+#### Development OS
+
+
+
+
+[//]: # 'macOS, Android'
+
+### 1. Enable Debugging over USB
+
+Most Android devices can only install and run apps downloaded from Google Play, by default. You will need to enable USB Debugging on your device in order to install your app during development.
+
+To enable USB debugging on your device, you will first need to enable the "Developer options" menu by going to **Settings** → **About phone** → **Software information** and then tapping the `Build number` row at the bottom seven times. You can then go back to **Settings** → **Developer options** to enable "USB debugging".
+
+### 2. Plug in your device via USB
+
+Let's now set up an Android device to run our React Native projects. Go ahead and plug in your device via USB to your development machine.
+
+Now check that your device is properly connecting to ADB, the Android Debug Bridge, by running `adb devices`.
+
+```shell
+$ adb devices
+List of devices attached
+emulator-5554 offline # Google emulator
+14ed2fcc device # Physical device
+```
+
+Seeing `device` in the right column means the device is connected. You must have **only one device connected** at a time.
+
+:::note
+If you see `unauthorized` in the list you will need to run `adb reverse tcp:8081 tcp:8081` and press allow USB debugging on the device.
+:::
+
+### 3. Run your app
+
+From the root of your project; type the following in your command prompt to install and launch your app on the device:
+
+
+
+
+```shell
+npm run android
+```
+
+
+
+
+```shell
+yarn android
+```
+
+
+
+
+:::note
+If you get a "bridge configuration isn't available" error, see [Using adb reverse](running-on-device.md#method-1-using-adb-reverse-recommended).
+:::
+
+:::tip
+You can also use the `React Native CLI` to generate and run a `release` build (e.g. from the root of your project: `yarn android --mode release`).
+:::
+
+
Connecting to the development server
+
+You can also iterate quickly on a device by connecting to the development server running on your development machine. There are several ways of accomplishing this, depending on whether you have access to a USB cable or a Wi-Fi network.
+
+### Method 1: Using adb reverse (recommended)
+
+You can use this method if your device is running Android 5.0 (Lollipop) or newer, it has USB debugging enabled, and it is connected via USB to your development machine.
+
+Run the following in a command prompt:
+
+```shell
+$ adb -s reverse tcp:8081 tcp:8081
+```
+
+To find the device name, run the following adb command:
+
+```shell
+$ adb devices
+```
+
+You can now enable Fast Refresh from the [Dev Menu](debugging.md#opening-the-dev-menu). Your app will reload whenever your JavaScript code has changed.
+
+### Method 2: Connect via Wi-Fi
+
+You can also connect to the development server over Wi-Fi. You'll first need to install the app on your device using a USB cable, but once that has been done you can debug wirelessly by following these instructions. You'll need your development machine's current IP address before proceeding.
+
+You can find the IP address in **System Settings (or System Preferences)** → **Network**.
+
+1. Make sure your laptop and your phone are on the **same** Wi-Fi network.
+2. Open your React Native app on your device.
+3. You'll see a [red screen with an error](debugging.md#logbox). This is OK. The following steps will fix that.
+4. Open the in-app [Dev Menu](debugging.md#opening-the-dev-menu).
+5. Go to **Dev Settings** → **Debug server host & port for device**.
+6. Type in your machine's IP address and the port of the local dev server (e.g. `10.0.1.1:8081`).
+7. Go back to the **Dev Menu** and select **Reload JS**.
+
+You can now enable Fast Refresh from the [Dev Menu](debugging.md#opening-the-dev-menu). Your app will reload whenever your JavaScript code has changed.
+
+## Building your app for production
+
+You have built a great app using React Native, and you are now itching to release it in the Play Store. The process is the same as any other native Android app, with some additional considerations to take into account. Follow the guide for [generating a signed APK](signed-apk-android.md) to learn more.
+
+
+
+
+[//]: # 'Windows, Android'
+
+### 1. Enable Debugging over USB
+
+Most Android devices can only install and run apps downloaded from Google Play, by default. You will need to enable USB Debugging on your device in order to install your app during development.
+
+To enable USB debugging on your device, you will first need to enable the "Developer options" menu by going to **Settings** → **About phone** → **Software information** and then tapping the `Build number` row at the bottom seven times. You can then go back to **Settings** → **Developer options** to enable "USB debugging".
+
+### 2. Plug in your device via USB
+
+Let's now set up an Android device to run our React Native projects. Go ahead and plug in your device via USB to your development machine.
+
+Now check that your device is properly connecting to ADB, the Android Debug Bridge, by running `adb devices`.
+
+```shell
+$ adb devices
+List of devices attached
+emulator-5554 offline # Google emulator
+14ed2fcc device # Physical device
+```
+
+Seeing `device` in the right column means the device is connected. You must have **only one device connected** at a time.
+
+### 3. Run your app
+
+From the root of your project, run the following in your command prompt to install and launch your app on the device:
+
+
+
+
+```shell
+npm run android
+```
+
+
+
+
+```shell
+yarn android
+```
+
+
+
+
+:::tip
+You can also use the `React Native CLI` to generate and run a `release` build (e.g. from the root of your project: `yarn android --mode release`).
+:::
+
+
Connecting to the development server
+
+You can also iterate quickly on a device by connecting to the development server running on your development machine. There are several ways of accomplishing this, depending on whether you have access to a USB cable or a Wi-Fi network.
+
+### Method 1: Using adb reverse (recommended)
+
+You can use this method if your device is running Android 5.0 (Lollipop) or newer, it has USB debugging enabled, and it is connected via USB to your development machine.
+
+Run the following in a command prompt:
+
+```shell
+$ adb -s reverse tcp:8081 tcp:8081
+```
+
+To find the device name, run the following adb command:
+
+```shell
+$ adb devices
+```
+
+You can now enable Fast Refresh from the [Dev Menu](debugging.md#opening-the-dev-menu). Your app will reload whenever your JavaScript code has changed.
+
+### Method 2: Connect via Wi-Fi
+
+You can also connect to the development server over Wi-Fi. You'll first need to install the app on your device using a USB cable, but once that has been done you can debug wirelessly by following these instructions. You'll need your development machine's current IP address before proceeding.
+
+Open the command prompt and type `ipconfig` to find your machine's IP address ([more info](https://windows.microsoft.com/en-us/windows/using-command-line-tools-networking-information)).
+
+1. Make sure your laptop and your phone are on the **same** Wi-Fi network.
+2. Open your React Native app on your device.
+3. You'll see a [red screen with an error](debugging.md#logbox). This is OK. The following steps will fix that.
+4. Open the in-app [Dev Menu](debugging.md#opening-the-dev-menu).
+5. Go to **Dev Settings** → **Debug server host & port for device**.
+6. Type in your machine's IP address and the port of the local dev server (e.g. `10.0.1.1:8081`).
+7. Go back to the **Dev Menu** and select **Reload JS**.
+
+You can now enable Fast Refresh from the [Dev Menu](debugging.md#opening-the-dev-menu). Your app will reload whenever your JavaScript code has changed.
+
+## Building your app for production
+
+You have built a great app using React Native, and you are now itching to release it in the Play Store. The process is the same as any other native Android app, with some additional considerations to take into account. Follow the guide for [generating a signed APK](signed-apk-android.md) to learn more.
+
+
+
+
+[//]: # 'Linux, Android'
+
+### 1. Enable Debugging over USB
+
+Most Android devices can only install and run apps downloaded from Google Play, by default. You will need to enable USB Debugging on your device in order to install your app during development.
+
+To enable USB debugging on your device, you will first need to enable the "Developer options" menu by going to **Settings** → **About phone** → **Software information** and then tapping the `Build number` row at the bottom seven times. You can then go back to **Settings** → **Developer options** to enable "USB debugging".
+
+### 2. Plug in your device via USB
+
+Let's now set up an Android device to run our React Native projects. Go ahead and plug in your device via USB to your development machine.
+
+Next, check the manufacturer code by using `lsusb` (on mac, you must first [install lsusb](https://github.com/jlhonora/lsusb)). `lsusb` should output something like this:
+
+```bash
+$ lsusb
+Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 001 Device 003: ID 22b8:2e76 Motorola PCS
+Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
+Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+```
+
+These lines represent the USB devices currently connected to your machine.
+
+You want the line that represents your phone. If you're in doubt, try unplugging your phone and running the command again:
+
+```bash
+$ lsusb
+Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
+Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
+Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
+```
+
+You'll see that after removing the phone, the line which has the phone model ("Motorola PCS" in this case) disappeared from the list. This is the line that we care about.
+
+`Bus 001 Device 003: ID 22b8:2e76 Motorola PCS`
+
+From the above line, you want to grab the first four digits from the device ID:
+
+`22b8:2e76`
+
+In this case, it's `22b8`. That's the identifier for Motorola.
+
+You'll need to input this into your udev rules in order to get up and running:
+
+```shell
+echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/51-android-usb.rules
+```
+
+Make sure that you replace `22b8` with the identifier you get in the above command.
+
+Now check that your device is properly connecting to ADB, the Android Debug Bridge, by running `adb devices`.
+
+```shell
+$ adb devices
+List of devices attached
+emulator-5554 offline # Google emulator
+14ed2fcc device # Physical device
+```
+
+Seeing `device` in the right column means the device is connected. You must have **only one device connected** at a time.
+
+### 3. Run your app
+
+From the root of your project, type the following in your command prompt to install and launch your app on the device:
+
+
+
+
+```shell
+npm run android
+```
+
+
+
+
+```shell
+yarn android
+```
+
+
+
+
+:::note
+If you get a "bridge configuration isn't available" error, see [Using adb reverse](running-on-device.md#method-1-using-adb-reverse-recommended).
+:::
+
+:::tip
+You can also use the `React Native CLI` to generate and run a `release` build (e.g. from the root of your project: `yarn android --mode release`).
+:::
+
+
Connecting to the development server
+
+You can also iterate quickly on a device by connecting to the development server running on your development machine. There are several ways of accomplishing this, depending on whether you have access to a USB cable or a Wi-Fi network.
+
+### Method 1: Using adb reverse (recommended)
+
+You can use this method if your device is running Android 5.0 (Lollipop) or newer, it has USB debugging enabled, and it is connected via USB to your development machine.
+
+Run the following in a command prompt:
+
+```shell
+$ adb -s reverse tcp:8081 tcp:8081
+```
+
+To find the device name, run the following adb command:
+
+```shell
+$ adb devices
+```
+
+You can now enable Fast Refresh from the [Dev Menu](debugging.md#opening-the-dev-menu). Your app will reload whenever your JavaScript code has changed.
+
+### Method 2: Connect via Wi-Fi
+
+You can also connect to the development server over Wi-Fi. You'll first need to install the app on your device using a USB cable, but once that has been done you can debug wirelessly by following these instructions. You'll need your development machine's current IP address before proceeding.
+
+Open a terminal and type `/sbin/ifconfig` to find your machine's IP address.
+
+1. Make sure your laptop and your phone are on the **same** Wi-Fi network.
+2. Open your React Native app on your device.
+3. You'll see a [red screen with an error](debugging.md#logbox). This is OK. The following steps will fix that.
+4. Open the in-app [Dev Menu](debugging.md#opening-the-dev-menu).
+5. Go to **Dev Settings** → **Debug server host & port for device**.
+6. Type in your machine's IP address and the port of the local dev server (e.g. `10.0.1.1:8081`).
+7. Go back to the **Dev Menu** and select **Reload JS**.
+
+You can now enable Fast Refresh from the [Dev Menu](debugging.md#opening-the-dev-menu). Your app will reload whenever your JavaScript code has changed.
+
+## Building your app for production
+
+You have built a great app using React Native, and you are now itching to release it in the Play Store. The process is the same as any other native Android app, with some additional considerations to take into account. Follow the guide for [generating a signed APK](signed-apk-android.md) to learn more.
+
+
+
+
+
+
+
+## Running your app on iOS devices
+
+#### Development OS
+
+
+
+
+[//]: # 'macOS, iOS'
+
+### 1. Plug in your device via USB
+
+Connect your iOS device to your Mac using a USB to Lightning or USB-C cable. Navigate to the `ios` folder in your project, then open the `.xcodeproj` file, or if you are using CocoaPods open `.xcworkspace`, within it using Xcode.
+
+If this is your first time running an app on your iOS device, you may need to register your device for development. Open the **Product** menu from Xcode's menubar, then go to **Destination**. Look for and select your device from the list. Xcode will then register your device for development.
+
+### 2. Configure code signing
+
+Register for an [Apple Developer account](https://developer.apple.com/) if you don't have one yet.
+
+Select your project in the Xcode Project Navigator, then select your main target (it should share the same name as your project). Look for the "General" tab. Go to "Signing" and make sure your Apple Developer account or team is selected under the Team dropdown. Do the same for the tests target (it ends with Tests, and is below your main target).
+
+**Repeat** this step for the **Tests** target in your project.
+
+
+
+### 3. Build and Run your app
+
+If everything is set up correctly, your device will be listed as the build target in the Xcode toolbar, and it will also appear in the Devices pane (Shift ⇧ + Cmd ⌘ + 2). You can now press the **Build and run** button (Cmd ⌘ + R) or select **Run** from the **Product** menu. Your app will launch on your device shortly.
+
+
+
+:::note
+If you run into any issues, please take a look at Apple's [Launching Your App on a Device](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html#//apple_ref/doc/uid/TP40012582-CH27-SW4) docs.
+:::
+
+
Connecting to the development server
+
+You can also iterate quickly on a device using the development server. You only have to be on the same Wi-Fi network as your computer. Shake your device to open the [Dev Menu](debugging.md#opening-the-dev-menu), then enable Fast Refresh. Your app will reload whenever your JavaScript code has changed.
+
+
+
+### Troubleshooting
+
+:::tip
+If you have any issues, ensure that your Mac and device are on the same network and can reach each other. Many open wireless networks with captive portals are configured to prevent devices from reaching other devices on the network. You may use your device's Personal Hotspot feature in this case. You may also share your internet (Wi-Fi/Ethernet) connection from your Mac to your device via USB and connect to the bundler through this tunnel for very high transfer speeds.
+:::
+
+When trying to connect to the development server you might get a [red screen with an error](debugging.md#logbox) saying:
+
+:::note
+Connection to `http://localhost:8081/debugger-proxy?role=client` timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in `RCTWebSocketExecutor.m`.
+:::
+
+To solve this issue check the following points.
+
+#### 1. Wi-Fi network.
+
+Make sure your laptop and your phone are on the **same** Wi-Fi network.
+
+#### 2. IP address
+
+Make sure that the build script detected the IP address of your machine correctly (e.g. `10.0.1.123`).
+
+
+
+Open the **Report navigator** tab, select the last **Build** and search for `IP=` followed by an IP address. The IP address which gets embedded in the app should match your machines IP address.
+
+## Building your app for production
+
+You have built a great app using React Native, and you are now itching to release it in the App Store. The process is the same as any other native iOS app, with some additional considerations to take into account. Follow the guide for [publishing to the Apple App Store](publishing-to-app-store.md) to learn more.
+
+
+
+
+[//]: # 'Windows, iOS'
+
+:::info
+A Mac is required in order to build your app for iOS devices. Alternatively, you can refer to our [environment setup guide](environment-setup) to learn how to build your app using Expo CLI, which will allow you to run your app using the Expo client app.
+:::
+
+
+
+
+[//]: # 'Linux, iOS'
+
+:::info
+A Mac is required in order to build your app for iOS devices. Alternatively, you can refer to our [environment setup guide](environment-setup) to learn how to build your app using Expo CLI, which will allow you to run your app using the Expo client app.
+:::
+
+
+
+
+
+
diff --git a/website/versioned_docs/version-0.86/running-on-simulator-ios.md b/website/versioned_docs/version-0.86/running-on-simulator-ios.md
new file mode 100644
index 00000000000..7fac4fcc905
--- /dev/null
+++ b/website/versioned_docs/version-0.86/running-on-simulator-ios.md
@@ -0,0 +1,94 @@
+---
+id: running-on-simulator-ios
+title: Running On Simulator
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+## Starting the simulator
+
+Once you have your React Native project initialized, you can run the following command inside the newly created project directory.
+
+
+
+
+```shell
+npm run ios
+```
+
+
+
+
+```shell
+yarn ios
+```
+
+
+
+
+If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.
+
+## Specifying a device
+
+You can specify the device the simulator should run with the `--simulator` flag, followed by the device name as a string. The default is `"iPhone 14"`. If you wish to run your app on an iPhone SE (3rd generation), run the following command:
+
+
+
+
+```shell
+npm run ios -- --simulator="iPhone SE (3rd generation)"
+```
+
+
+
+
+```shell
+yarn ios --simulator "iPhone SE (3rd generation)"
+```
+
+
+
+
+The device names correspond to the list of devices available in Xcode. You can check your available devices by running `xcrun simctl list devices` from the console.
+
+### Specifying a version of device
+
+If you have multiple iOS versions installed, you also need to specify its appropriate version. E.g. To run your app on an iPhone 14 Pro (16.0) run the following command:
+
+
+
+
+```shell
+npm run ios -- --simulator="iPhone 14 Pro (16.0)"
+```
+
+
+
+
+```shell
+yarn ios --simulator "iPhone 14 Pro (16.0)"
+```
+
+
+
+
+## Specifying an UDID
+
+You can specify the device UDID returned from `xcrun simctl list devices` command. E.g. To run your app with UDID `AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA` run the following command:
+
+
+
+
+```shell
+npm run ios -- --udid="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"
+```
+
+
+
+
+```shell
+yarn ios --udid "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"
+```
+
+
+
diff --git a/website/versioned_docs/version-0.86/safeareaview.md b/website/versioned_docs/version-0.86/safeareaview.md
new file mode 100644
index 00000000000..fd0d2d479c3
--- /dev/null
+++ b/website/versioned_docs/version-0.86/safeareaview.md
@@ -0,0 +1,55 @@
+---
+id: safeareaview
+title: '🗑️ SafeAreaView'
+---
+
+:::warning Deprecated
+Use [react-native-safe-area-context](https://github.com/AppAndFlow/react-native-safe-area-context) instead.
+:::
+
+The purpose of `SafeAreaView` is to render content within the safe area boundaries of a device. It is currently only applicable to iOS devices with iOS version 11 or later.
+
+`SafeAreaView` renders nested content and automatically applies padding to reflect the portion of the view that is not covered by navigation bars, tab bars, toolbars, and other ancestor views. Moreover, and most importantly, Safe Area's paddings reflect the physical limitation of the screen, such as rounded corners or camera notches (i.e. the sensor housing area on iPhone 13).
+
+## Example
+
+To use, wrap your top level view with a `SafeAreaView` with a `flex: 1` style applied to it. You may also want to use a background color that matches your application's design.
+
+```SnackPlayer name=SafeAreaView&supportedPlatforms=ios
+import React from 'react';
+import {StyleSheet, Text, SafeAreaView} from 'react-native';
+
+const App = () => {
+ return (
+
+ Page content
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ text: {
+ fontSize: 25,
+ fontWeight: '500',
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view.md#props).
+
+:::note
+As padding is used to implement the behavior of the component, padding rules in styles applied to a `SafeAreaView` will be ignored and can cause different results depending on the platform. See [#22211](https://github.com/facebook/react-native/issues/22211) for details.
+:::
diff --git a/website/versioned_docs/version-0.86/scrollview.md b/website/versioned_docs/version-0.86/scrollview.md
new file mode 100644
index 00000000000..5224d095f94
--- /dev/null
+++ b/website/versioned_docs/version-0.86/scrollview.md
@@ -0,0 +1,779 @@
+---
+id: scrollview
+title: ScrollView
+---
+
+Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
+
+Keep in mind that ScrollViews must have a bounded height in order to work, since they contain unbounded-height children into a bounded container (via a scroll interaction). In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. Forgetting to transfer `{flex: 1}` down the view stack can lead to errors here, which the element inspector makes quick to debug.
+
+Doesn't yet support other contained responders from blocking this scroll view from becoming the responder.
+
+`` vs [``](flatlist.md) - which one to use?
+
+`ScrollView` renders all its react child components at once, but this has a performance downside.
+
+Imagine you have a very long list of items you want to display, maybe several screens worth of content. Creating JS components and native views for everything all at once, much of which may not even be shown, will contribute to slow rendering and increased memory usage.
+
+This is where `FlatList` comes into play. `FlatList` renders items lazily, when they are about to appear, and removes items that scroll way off screen to save memory and processing time.
+
+`FlatList` is also handy if you want to render separators between your items, multiple columns, infinite scroll loading, or any number of other features it supports out of the box.
+
+## Example
+
+```SnackPlayer name=ScrollView%20Example
+import React from 'react';
+import {StyleSheet, Text, ScrollView, StatusBar} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => (
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
+ minim veniam, quis nostrud exercitation ullamco laboris nisi ut
+ aliquip ex ea commodo consequat. Duis aute irure dolor in
+ reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
+ pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
+ culpa qui officia deserunt mollit anim id est laborum.
+
+
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingTop: StatusBar.currentHeight,
+ },
+ scrollView: {
+ backgroundColor: 'pink',
+ },
+ text: {
+ fontSize: 42,
+ padding: 12,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Props
+
+### [View Props](view.md#props)
+
+Inherits [View Props](view#props).
+
+---
+
+### `StickyHeaderComponent`
+
+A React Component that will be used to render sticky headers, should be used together with `stickyHeaderIndices`. You may need to set this component if your sticky header uses custom transforms, for example, when you want your list to have an animated and hidable header. If a component has not been provided, the default [`ScrollViewStickyHeader`](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js) component will be used.
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `alwaysBounceHorizontal`
iOS
+
+When true, the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself.
+
+| Type | Default |
+| ---- | ----------------------------------------------------- |
+| bool | `true` when `horizontal={true}``false` otherwise |
+
+---
+
+### `alwaysBounceVertical`
iOS
+
+When true, the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself.
+
+| Type | Default |
+| ---- | ----------------------------------------------------- |
+| bool | `false` when `horizontal={true}``true` otherwise |
+
+---
+
+### `automaticallyAdjustContentInsets`
iOS
+
+Controls whether iOS should automatically adjust the content inset for scroll views that are placed behind a navigation bar or tab bar/toolbar.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `automaticallyAdjustKeyboardInsets`
iOS
+
+Controls whether the ScrollView should automatically adjust its `contentInset` and `scrollViewInsets` when the Keyboard changes its size.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `automaticallyAdjustsScrollIndicatorInsets`
iOS
+
+Controls whether iOS should automatically adjust the scroll indicator insets. See Apple's [documentation on the property](https://developer.apple.com/documentation/uikit/uiscrollview/3198043-automaticallyadjustsscrollindica).
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `bounces`
iOS
+
+When true, the scroll view bounces when it reaches the end of the content if the content is larger than the scroll view along the axis of the scroll direction. When `false`, it disables all bouncing even if the `alwaysBounce*` props are `true`.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `bouncesZoom`
iOS
+
+When `true`, gestures can drive zoom past min/max and the zoom will animate to the min/max value at gesture end, otherwise the zoom will not exceed the limits.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `canCancelContentTouches`
iOS
+
+When `false`, once tracking starts, won't try to drag if the touch moves.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `centerContent`
iOS
+
+When `true`, the scroll view automatically centers the content when the content is smaller than the scroll view bounds; when the content is larger than the scroll view, this property has no effect.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `contentContainerStyle`
+
+These styles will be applied to the scroll view content container which wraps all of the child views. Example:
+
+```
+return (
+
+
+);
+...
+const styles = StyleSheet.create({
+ contentContainer: {
+ paddingVertical: 20
+ }
+});
+```
+
+| Type |
+| ------------------------------ |
+| [View Style](view-style-props) |
+
+---
+
+### `contentInset`
iOS
+
+The amount by which the scroll view content is inset from the edges of the scroll view.
+
+| Type | Default |
+| -------------------------------------------------------------------- | ---------------------------------------- |
+| object: `{top: number, left: number, bottom: number, right: number}` | `{top: 0, left: 0, bottom: 0, right: 0}` |
+
+---
+
+### `contentInsetAdjustmentBehavior`
iOS
+
+This property specifies how the safe area insets are used to modify the content area of the scroll view. Available on iOS 11 and later.
+
+| Type | Default |
+| -------------------------------------------------------------- | --------- |
+| enum(`'automatic'`, `'scrollableAxes'`, `'never'`, `'always'`) | `'never'` |
+
+---
+
+### `contentOffset`
+
+Used to manually set the starting scroll offset.
+
+| Type | Default |
+| ----- | -------------- |
+| Point | `{x: 0, y: 0}` |
+
+---
+
+### `decelerationRate`
+
+A floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger. You may also use string shortcuts `"normal"` and `"fast"` which match the underlying iOS settings for `UIScrollViewDecelerationRateNormal` and `UIScrollViewDecelerationRateFast` respectively.
+
+- `'normal'` 0.998 on iOS, 0.985 on Android.
+- `'fast'`, 0.99 on iOS, 0.9 on Android.
+
+| Type | Default |
+| ---------------------------------- | ---------- |
+| enum(`'fast'`, `'normal'`), number | `'normal'` |
+
+---
+
+### `directionalLockEnabled`
iOS
+
+When true, the ScrollView will try to lock to only vertical or horizontal scrolling while dragging.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `disableIntervalMomentum`
+
+When true, the scroll view stops on the next index (in relation to scroll position at release) regardless of how fast the gesture is. This can be used for pagination when the page is less than the width of the horizontal ScrollView or the height of the vertical ScrollView.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `disableScrollViewPanResponder`
+
+When true, the default JS pan responder on the ScrollView is disabled, and full control over touches inside the ScrollView is left to its child components. This is particularly useful if `snapToInterval` is enabled, since it does not follow typical touch patterns. Do not use this on regular ScrollView use cases without `snapToInterval` as it may cause unexpected touches to occur while scrolling.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `endFillColor`
Android
+
+Sometimes a scrollview takes up more space than its content fills. When this is the case, this prop will fill the rest of the scrollview with a color to avoid setting a background and creating unnecessary overdraw. This is an advanced optimization that is not needed in the general case.
+
+| Type |
+| --------------- |
+| [color](colors) |
+
+---
+
+### `fadingEdgeLength`
Android
+
+Fades out the edges of the scroll content.
+
+If the value is greater than `0`, the fading edges will be set accordingly to the current scroll direction and position, indicating if there is more content to show.
+
+| Type | Default |
+| -------------------------------------------------- | ------- |
+| numberobject: `{start: number, end: number}` | `0` |
+
+---
+
+### `horizontal`
+
+When `true`, the scroll view's children are arranged horizontally in a row instead of vertically in a column.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `indicatorStyle`
iOS
+
+The style of the scroll indicators.
+
+- `'default'` same as `black`.
+- `'black'`, scroll indicator is `black`. This style is good against a light background.
+- `'white'`, scroll indicator is `white`. This style is good against a dark background.
+
+| Type | Default |
+| --------------------------------------- | ----------- |
+| enum(`'default'`, `'black'`, `'white'`) | `'default'` |
+
+---
+
+### `invertStickyHeaders`
+
+If sticky headers should stick at the bottom instead of the top of the ScrollView. This is usually used with inverted ScrollViews.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `keyboardDismissMode`
+
+Determines whether the keyboard gets dismissed in response to a drag.
+
+- `'none'`, drags do not dismiss the keyboard.
+- `'on-drag'`, the keyboard is dismissed when a drag begins.
+
+**iOS Only**
+
+- `'interactive'`, the keyboard is dismissed interactively with the drag and moves in synchrony with the touch, dragging upwards cancels the dismissal. On Android this is not supported and it will have the same behavior as `'none'`.
+
+| Type | Default |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
+| enum(`'none'`, `'on-drag'`)
Android
enum(`'none'`, `'on-drag'`, `'interactive'`)
iOS
| `'none'` |
+
+---
+
+### `keyboardShouldPersistTaps`
+
+Determines when the keyboard should stay visible after a tap.
+
+- `'never'` tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
+- `'always'`, the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
+- `'handled'`, the keyboard will not dismiss automatically when the tap was handled by children of the scroll view (or captured by an ancestor).
+- `false`, **_deprecated_**, use `'never'` instead
+- `true`, **_deprecated_**, use `'always'` instead
+
+| Type | Default |
+| --------------------------------------------------------- | --------- |
+| enum(`'always'`, `'never'`, `'handled'`, `false`, `true`) | `'never'` |
+
+---
+
+### `maintainVisibleContentPosition`
+
+When set, the scroll view will adjust the scroll position so that the first child that is currently visible and at or beyond `minIndexForVisible` will not change position. This is useful for lists that are loading content in both directions, e.g. a chat thread, where new messages coming in might otherwise cause the scroll position to jump. A value of 0 is common, but other values such as 1 can be used to skip loading spinners or other content that should not maintain position.
+
+The optional `autoscrollToTopThreshold` can be used to make the content automatically scroll to the top after making the adjustment if the user was within the threshold of the top before the adjustment was made. This is also useful for chat-like applications where you want to see new messages scroll into place, but not if the user has scrolled up a ways and it would be disruptive to scroll a bunch.
+
+Caveat 1: Reordering elements in the scrollview with this enabled will probably cause jumpiness and jank. It can be fixed, but there are currently no plans to do so. For now, don't re-order the content of any ScrollViews or Lists that use this feature.
+
+Caveat 2: This uses `contentOffset` and `frame.origin` in native code to compute visibility. Occlusion, transforms, and other complexity won't be taken into account as to whether content is "visible" or not.
+
+| Type |
+| ------------------------------------------------------------------------ |
+| object: `{minIndexForVisible: number, autoscrollToTopThreshold: number}` |
+
+---
+
+### `maximumZoomScale`
iOS
+
+The maximum allowed zoom scale.
+
+| Type | Default |
+| ------ | ------- |
+| number | `1.0` |
+
+---
+
+### `minimumZoomScale`
+
+Enables nested scrolling for Android API level 21+.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `onContentSizeChange`
+
+Called when scrollable content view of the ScrollView changes.
+
+The handler function will receive two parameters: the content width and content height `(contentWidth, contentHeight)`.
+
+It's implemented using onLayout handler attached to the content container which this ScrollView renders.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onMomentumScrollBegin`
+
+Called when the momentum scroll starts (scroll which occurs as the ScrollView starts gliding).
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onMomentumScrollEnd`
+
+Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onScroll`
+
+Fires at most once per frame during scrolling. The event has the following shape (all values with unspecified type are numbers):
+
+```js
+{
+ nativeEvent: {
+ contentInset: {bottom, left, right, top},
+ contentOffset: {x, y},
+ contentSize: {height, width},
+ layoutMeasurement: {height, width},
+ velocity: {x, y},
+ responderIgnoreScroll: boolean,
+ zoomScale,
+ // iOS only
+ targetContentOffset: {x, y}
+ }
+}
+```
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onScrollBeginDrag`
+
+Called when the user begins to drag the scroll view.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onScrollEndDrag`
+
+Called when the user stops dragging the scroll view and it either stops or begins to glide.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onScrollToTop`
iOS
+
+Fires when the scroll view scrolls to top after the status bar has been tapped.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `overScrollMode`
Android
+
+Used to override default value of overScroll mode.
+
+Possible values:
+
+- `'auto'` - Allow a user to over-scroll this view only if the content is large enough to meaningfully scroll.
+- `'always'` - Always allow a user to over-scroll this view.
+- `'never'` - Never allow a user to over-scroll this view.
+
+| Type | Default |
+| ------------------------------------- | -------- |
+| enum(`'auto'`, `'always'`, `'never'`) | `'auto'` |
+
+---
+
+### `pagingEnabled`
+
+When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `persistentScrollbar`
Android
+
+Causes the scrollbars not to turn transparent when they are not in use.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `pinchGestureEnabled`
iOS
+
+When true, ScrollView allows use of pinch gestures to zoom in and out.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `refreshControl`
+
+A RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView. Only works for vertical ScrollViews (`horizontal` prop must be `false`).
+
+See [RefreshControl](refreshcontrol).
+
+| Type |
+| ------- |
+| element |
+
+---
+
+### `removeClippedSubviews`
+
+:::warning
+Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
+:::
+
+When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `scrollEnabled`
+
+When false, the view cannot be scrolled via touch interaction.
+
+Note that the view can always be scrolled by calling `scrollTo`.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `scrollEventThrottle`
+
+Limits how often scroll events will be fired while scrolling, specified as a time interval in ms. This may be useful when expensive work is performed in response to scrolling. Values ≤ `16` will disable throttling, regardless of the refresh rate of the device.
+
+| Type | Default |
+| ------ | ------- |
+| number | `0` |
+
+---
+
+### `scrollIndicatorInsets`
iOS
+
+The amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the `contentInset`.
+
+| Type | Default |
+| -------------------------------------------------------------------- | ---------------------------------------- |
+| object: `{top: number, left: number, bottom: number, right: number}` | `{top: 0, left: 0, bottom: 0, right: 0}` |
+
+---
+
+### `scrollPerfTag`
Android
+
+Tag used to log scroll performance on this scroll view. Will force momentum events to be turned on (see sendMomentumEvents). This doesn't do anything out of the box and you need to implement a custom native FpsListener for it to be useful.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `scrollToOverflowEnabled`
iOS
+
+When `true`, the scroll view can be programmatically scrolled beyond its content size.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `scrollsToTop`
iOS
+
+When `true`, the scroll view scrolls to top when the status bar is tapped.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `showsHorizontalScrollIndicator`
+
+When `true`, shows a horizontal scroll indicator.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `showsVerticalScrollIndicator`
+
+When `true`, shows a vertical scroll indicator.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `snapToAlignment`
+
+When `snapToInterval` is set, `snapToAlignment` will define the relationship of the snapping to the scroll view.
+
+Possible values:
+
+- `'start'` will align the snap at the left (horizontal) or top (vertical).
+- `'center'` will align the snap in the center.
+- `'end'` will align the snap at the right (horizontal) or bottom (vertical).
+
+| Type | Default |
+| ------------------------------------ | --------- |
+| enum(`'start'`, `'center'`, `'end'`) | `'start'` |
+
+---
+
+### `snapToEnd`
+
+Use in conjunction with `snapToOffsets`. By default, the end of the list counts as a snap offset. Set `snapToEnd` to false to disable this behavior and allow the list to scroll freely between its end and the last `snapToOffsets` offset.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `snapToInterval`
+
+When set, causes the scroll view to stop at multiples of the value of `snapToInterval`. This can be used for paginating through children that have lengths smaller than the scroll view. Typically used in combination with `snapToAlignment` and `decelerationRate="fast"`. Overrides less configurable `pagingEnabled` prop.
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `snapToOffsets`
+
+When set, causes the scroll view to stop at the defined offsets. This can be used for paginating through variously sized children that have lengths smaller than the scroll view. Typically used in combination with `decelerationRate="fast"`. Overrides less configurable `pagingEnabled` and `snapToInterval` props.
+
+| Type |
+| --------------- |
+| array of number |
+
+---
+
+### `snapToStart`
+
+Use in conjunction with `snapToOffsets`. By default, the beginning of the list counts as a snap offset. Set `snapToStart` to `false` to disable this behavior and allow the list to scroll freely between its start and the first `snapToOffsets` offset.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `true` |
+
+---
+
+### `stickyHeaderHiddenOnScroll`
+
+When set to `true`, sticky header will be hidden when scrolling down the list, and it will dock at the top of the list when scrolling up.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+
+### `stickyHeaderIndices`
+
+An array of child indices determining which children get docked to the top of the screen when scrolling. For example, passing `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the top of the scroll view. You can also use like [x,y,z] to make multiple items sticky when they are at the top. This property is not supported in conjunction with `horizontal={true}`.
+
+| Type |
+| --------------- |
+| array of number |
+
+---
+
+### `zoomScale`
iOS
+
+The current scale of the scroll view content.
+
+| Type | Default |
+| ------ | ------- |
+| number | `1.0` |
+
+---
+
+## Methods
+
+### `flashScrollIndicators()`
+
+```tsx
+flashScrollIndicators();
+```
+
+Displays the scroll indicators momentarily.
+
+---
+
+### `scrollTo()`
+
+```tsx
+scrollTo(
+ options?: {x?: number, y?: number, animated?: boolean} | number,
+ deprecatedX?: number,
+ deprecatedAnimated?: boolean,
+);
+```
+
+Scrolls to a given x, y offset, either immediately, with a smooth animation.
+
+**Example:**
+
+`scrollTo({x: 0, y: 0, animated: true})`
+
+:::note
+The weird function signature is due to the fact that, for historical reasons, the function also accepts separate arguments as an alternative to the options object. This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
+:::
+
+---
+
+### `scrollToEnd()`
+
+```tsx
+scrollToEnd(options?: {animated?: boolean});
+```
+
+If this is a vertical ScrollView scrolls to the bottom. If this is a horizontal ScrollView scrolls to the right.
+
+Use `scrollToEnd({animated: true})` for smooth animated scrolling, `scrollToEnd({animated: false})` for immediate scrolling. If no options are passed, `animated` defaults to `true`.
diff --git a/website/versioned_docs/version-0.86/sectionlist.md b/website/versioned_docs/version-0.86/sectionlist.md
new file mode 100644
index 00000000000..d0e9519a301
--- /dev/null
+++ b/website/versioned_docs/version-0.86/sectionlist.md
@@ -0,0 +1,368 @@
+---
+id: sectionlist
+title: SectionList
+---
+
+A performant interface for rendering sectioned lists, supporting the most handy features:
+
+- Fully cross-platform.
+- Configurable viewability callbacks.
+- List header support.
+- List footer support.
+- Item separator support.
+- Section header support.
+- Section separator support.
+- Heterogeneous data and item rendering support.
+- Pull to Refresh.
+- Scroll loading.
+
+If you don't need section support and want a simpler interface, use [``](flatlist.md).
+
+## Example
+
+```SnackPlayer name=SectionList%20Example
+import React from 'react';
+import {StyleSheet, Text, View, SectionList, StatusBar} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const DATA = [
+ {
+ title: 'Main dishes',
+ data: ['Pizza', 'Burger', 'Risotto'],
+ },
+ {
+ title: 'Sides',
+ data: ['French Fries', 'Onion Rings', 'Fried Shrimps'],
+ },
+ {
+ title: 'Drinks',
+ data: ['Water', 'Coke', 'Beer'],
+ },
+ {
+ title: 'Desserts',
+ data: ['Cheese Cake', 'Ice Cream'],
+ },
+];
+
+const App = () => (
+
+
+ item + index}
+ renderItem={({item}) => (
+
+ {item}
+
+ )}
+ renderSectionHeader={({section: {title}}) => (
+ {title}
+ )}
+ />
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ paddingTop: StatusBar.currentHeight,
+ marginHorizontal: 16,
+ },
+ item: {
+ backgroundColor: '#f9c2ff',
+ padding: 20,
+ marginVertical: 8,
+ },
+ header: {
+ fontSize: 32,
+ backgroundColor: '#fff',
+ },
+ title: {
+ fontSize: 24,
+ },
+});
+
+export default App;
+```
+
+This is a convenience wrapper around [``](virtualizedlist.md), and thus inherits its props (as well as those of [``](scrollview.md)) that aren't explicitly listed here, along with the following caveats:
+
+- Internal state is not preserved when content scrolls out of the render window. Make sure all your data is captured in the item data or external stores like Flux, Redux, or Relay.
+- This is a `PureComponent` which means that it will not re-render if `props` remain shallow-equal. Make sure that everything your `renderItem` function depends on is passed as a prop (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on changes. This includes the `data` prop and parent component state.
+- In order to constrain memory and enable smooth scrolling, content is rendered asynchronously offscreen. This means it's possible to scroll faster than the fill rate and momentarily see blank content. This is a tradeoff that can be adjusted to suit the needs of each application, and we are working on improving it behind the scenes.
+- By default, the list looks for a `key` prop on each item and uses that for the React key. Alternatively, you can provide a custom `keyExtractor` prop.
+
+---
+
+# Reference
+
+## Props
+
+### [VirtualizedList Props](virtualizedlist.md#props)
+
+Inherits [VirtualizedList Props](virtualizedlist.md#props).
+
+---
+
+###
Required
**`renderItem`**
+
+Default renderer for every item in every section. Can be over-ridden on a per-section basis. Should return a React element.
+
+| Type |
+| -------- |
+| function |
+
+The render function will be passed an object with the following keys:
+
+- 'item' (object) - the item object as specified in this section's `data` key
+- 'index' (number) - Item's index within the section.
+- 'section' (object) - The full section object as specified in `sections`.
+- 'separators' (object) - An object with the following keys:
+ - 'highlight' (function) - `() => void`
+ - 'unhighlight' (function) - `() => void`
+ - 'updateProps' (function) - `(select, newProps) => void`
+ - 'select' (enum) - possible values are 'leading', 'trailing'
+ - 'newProps' (object)
+
+---
+
+###
Required
**`sections`**
+
+The actual data to render, akin to the `data` prop in [`FlatList`](flatlist.md).
+
+| Type |
+| ------------------------------------------- |
+| array of [Section](sectionlist.md#section)s |
+
+---
+
+### `extraData`
+
+A marker property for telling the list to re-render (since it implements `PureComponent`). If any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the `data` prop, stick it here and treat it immutably.
+
+| Type |
+| ---- |
+| any |
+
+---
+
+### `initialNumToRender`
+
+How many items to render in the initial batch. This should be enough to fill the screen but not much more. Note these items will never be unmounted as part of the windowed rendering in order to improve perceived performance of scroll-to-top actions.
+
+| Type | Default |
+| ------ | ------- |
+| number | `10` |
+
+---
+
+### `inverted`
+
+Reverses the direction of scroll. Uses scale transforms of -1.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+---
+
+### `ItemSeparatorComponent`
+
+Rendered in between each item, but not at the top or bottom. By default, `highlighted`, `section`, and `[leading/trailing][Item/Section]` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ---------------------------- |
+| component, function, element |
+
+---
+
+### `keyExtractor`
+
+Used to extract a unique key for a given item at the specified index. Key is used for caching and as the React key to track item re-ordering. The default extractor checks `item.key`, then `item.id`, and then falls back to using the index, like React does. Note that this sets keys for each item, but each overall section still needs its own key.
+
+| Type |
+| --------------------------------------- |
+| (item: object, index: number) => string |
+
+---
+
+### `ListEmptyComponent`
+
+Rendered when the list is empty. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `ListFooterComponent`
+
+Rendered at the very end of the list. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `ListHeaderComponent`
+
+Rendered at the very beginning of the list. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``).
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `onRefresh`
+
+If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the `refreshing` prop correctly. To offset the RefreshControl from the top (e.g. by 100 pts), use `progressViewOffset={100}`.
+
+| Type |
+| -------- |
+| function |
+
+---
+
+### `onViewableItemsChanged`
+
+Called when the viewability of rows changes, as defined by the `viewabilityConfig` prop.
+
+| Type |
+| ----------------------------------------------------------------------------------------------------- |
+| `md (callback: {changed: [ViewToken](viewtoken)[], viewableItems: [ViewToken](viewtoken)[]}) => void` |
+
+---
+
+### `refreshing`
+
+Set this true while waiting for new data from a refresh.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+---
+
+### `removeClippedSubviews`
+
+:::warning
+Using this property may lead to bugs (missing content) in some circumstances - use at your own risk.
+:::
+
+When `true`, offscreen child views are removed from their native backing superview when offscreen. This may improve scroll performance for large lists. On Android the default value is `true`.
+
+| Type |
+| ------- |
+| boolean |
+
+---
+
+### `renderSectionFooter`
+
+Rendered at the bottom of each section.
+
+| Type |
+| ------------------------------------------------------------------------- |
+| `md (info: {section: [Section](sectionlist#section)}) => element | null` |
+
+---
+
+### `renderSectionHeader`
+
+Rendered at the top of each section. These stick to the top of the `ScrollView` by default on iOS. See `stickySectionHeadersEnabled`.
+
+| Type |
+| ------------------------------------------------------------------------- |
+| `md (info: {section: [Section](sectionlist#section)}) => element | null` |
+
+---
+
+### `SectionSeparatorComponent`
+
+Rendered at the top and bottom of each section (note this is different from `ItemSeparatorComponent` which is only rendered between items). These are intended to separate sections from the headers above and below and typically have the same highlight response as `ItemSeparatorComponent`. Also receives `highlighted`, `[leading/trailing][Item/Section]`, and any custom props from `separators.updateProps`.
+
+| Type |
+| ------------------ |
+| component, element |
+
+---
+
+### `stickySectionHeadersEnabled`
+
+Makes section headers stick to the top of the screen until the next one pushes it off. Only enabled by default on iOS because that is the platform standard there.
+
+| Type | Default |
+| ------- | ---------------------------------------------------------------------------------------------------- |
+| boolean | `false`
Android
`true`
iOS
|
+
+## Methods
+
+### `flashScrollIndicators()`
iOS
+
+```tsx
+flashScrollIndicators();
+```
+
+Displays the scroll indicators momentarily.
+
+---
+
+### `recordInteraction()`
+
+```tsx
+recordInteraction();
+```
+
+Tells the list an interaction has occurred, which should trigger viewability calculations, e.g. if `waitForInteractions` is true and the user has not scrolled. This is typically called by taps on items or by navigation actions.
+
+---
+
+### `scrollToLocation()`
+
+```tsx
+scrollToLocation(params: SectionListScrollParams);
+```
+
+Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section) positioned in the viewable area such that `viewPosition` set to `0` places it at the top (and may be covered by a sticky header), `1` at the bottom, and `0.5` centered in the middle.
+
+:::note
+You cannot scroll to locations outside the render window without specifying the `getItemLayout` or `onScrollToIndexFailed` prop.
+:::
+
+**Parameters:**
+
+| Name | Type |
+| ----------------------------------------------------------- | ------ |
+| params
Required
| object |
+
+Valid `params` keys are:
+
+- 'animated' (boolean) - Whether the list should do an animation while scrolling. Defaults to `true`.
+- 'itemIndex' (number) - Index within section for the item to scroll to. Required.
+- 'sectionIndex' (number) - Index for section that contains the item to scroll to. Required.
+- 'viewOffset' (number) - A fixed number of pixels to offset the final target position, e.g. to compensate for sticky headers.
+- 'viewPosition' (number) - A value of `0` places the item specified by index at the top, `1` at the bottom, and `0.5` centered in the middle.
+
+## Type Definitions
+
+### Section
+
+An object that identifies the data to be rendered for a given section.
+
+| Type |
+| ---- |
+| any |
+
+**Properties:**
+
+| Name | Type | Description |
+| --------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| data
Required
| array | The data for rendering items in this section. Array of objects, much like [`FlatList`'s data prop](flatlist#required-data). |
+| key | string | Optional key to keep track of section re-ordering. If you don't plan on re-ordering sections, the array index will be used by default. |
+| renderItem | function | Optionally define an arbitrary item renderer for this section, overriding the default [`renderItem`](sectionlist#renderitem) for the list. |
+| ItemSeparatorComponent | component, element | Optionally define an arbitrary item separator for this section, overriding the default [`ItemSeparatorComponent`](sectionlist#itemseparatorcomponent) for the list. |
+| keyExtractor | function | Optionally define an arbitrary key extractor for this section, overriding the default [`keyExtractor`](sectionlist#keyextractor). |
diff --git a/website/versioned_docs/version-0.86/security.md b/website/versioned_docs/version-0.86/security.md
new file mode 100644
index 00000000000..bf8ed1ff5d4
--- /dev/null
+++ b/website/versioned_docs/version-0.86/security.md
@@ -0,0 +1,136 @@
+---
+id: security
+title: Security
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Security is often overlooked when building apps. It is true that it is impossible to build software that is completely impenetrable—we’ve yet to invent a completely impenetrable lock (bank vaults do, after all, still get broken into). However, the probability of falling victim to a malicious attack or being exposed for a security vulnerability is inversely proportional to the effort you’re willing to put in to protecting your application against any such eventuality. Although an ordinary padlock is pickable, it is still much harder to get past than a cabinet hook!
+
+
+
+In this guide, you will learn about best practices for storing sensitive information, authentication, network security, and tools that will help you secure your app. This is not a preflight checklist—it is a catalogue of options, each of which will help further protect your app and users.
+
+## Storing Sensitive Info
+
+Never store sensitive API keys in your app code. Anything included in your code could be accessed in plain text by anyone inspecting the app bundle. Tools like [react-native-dotenv](https://github.com/goatandsheep/react-native-dotenv) and [react-native-config](https://github.com/luggit/react-native-config/) are great for adding environment-specific variables like API endpoints, but they should not be confused with server-side environment variables, which can often contain secrets and API keys.
+
+If you must have an API key or a secret to access some resource from your app, the most secure way to handle this would be to build an orchestration layer between your app and the resource. This could be a serverless function (e.g. using AWS Lambda or Google Cloud Functions) which can forward the request with the required API key or secret. Secrets in server side code cannot be accessed by the API consumers the same way secrets in your app code can.
+
+**For persisted user data, choose the right type of storage based on its sensitivity.** As your app is used, you’ll often find the need to save data on the device, whether to support your app being used offline, cut down on network requests or save your user’s access token between sessions so they wouldn’t have to re-authenticate each time they use the app.
+
+:::info
+**Persisted vs unpersisted** — persisted data is written to the device’s disk, which lets the data be read by your app across application launches without having to do another network request to fetch it or asking the user to re-enter it. But this also can make that data more vulnerable to being accessed by attackers. Unpersisted data is never written to disk—so there's no data to access!
+:::
+
+### Async Storage
+
+[Async Storage](https://github.com/react-native-async-storage/async-storage) is a community-maintained module for React Native that provides an asynchronous, unencrypted, key-value store. Async Storage is not shared between apps: every app has its own sandbox environment and has no access to data from other apps.
+
+| **Do** use async storage when... | **Don't** use async storage for... |
+| --------------------------------------------- | ---------------------------------- |
+| Persisting non-sensitive data across app runs | Token storage |
+| Persisting Redux state | Secrets |
+| Persisting GraphQL state | |
+| Storing global app-wide variables | |
+
+#### Developer Notes
+
+
+
+
+
+:::note
+Async Storage is the React Native equivalent of Local Storage from the web
+:::
+
+
+
+
+### Secure Storage
+
+React Native does not come bundled with any way of storing sensitive data. However, there are pre-existing solutions for Android and iOS platforms.
+
+#### iOS - Keychain Services
+
+[Keychain Services](https://developer.apple.com/documentation/security/keychain_services) allows you to securely store small chunks of sensitive info for the user. This is an ideal place to store certificates, tokens, passwords, and any other sensitive information that doesn’t belong in Async Storage.
+
+#### Android - Secure Shared Preferences
+
+[Shared Preferences](https://developer.android.com/reference/android/content/SharedPreferences) is the Android equivalent for a persistent key-value data store. **Data in Shared Preferences is not encrypted by default**, but [Encrypted Shared Preferences](https://developer.android.com/topic/security/data) wraps the Shared Preferences class for Android, and automatically encrypts keys and values.
+
+#### Android - Keystore
+
+The [Android Keystore](https://developer.android.com/training/articles/keystore) system lets you store cryptographic keys in a container to make it more difficult to extract from the device.
+
+In order to use iOS Keychain services or Android Secure Shared Preferences, you can either write a bridge yourself or use a library which wraps them for you and provides a unified API at your own risk. Some libraries to consider:
+
+- [expo-secure-store](https://docs.expo.dev/versions/latest/sdk/securestore/)
+- [react-native-keychain](https://github.com/oblador/react-native-keychain)
+
+:::warning Caution
+**Be mindful of unintentionally storing or exposing sensitive info.** This could happen accidentally, for example saving sensitive form data in redux state and persisting the whole state tree in Async Storage. Or sending user tokens and personal info to an application monitoring service such as Sentry or Crashlytics.
+:::
+
+## Authentication and Deep Linking
+
+
+
+Mobile apps have a unique vulnerability that is non-existent in the web: **deep linking**. Deep linking is a way of sending data directly to a native application from an outside source. A deep link looks like `app://` where `app` is your app scheme and anything following the // could be used internally to handle the request.
+
+For example, if you were building an ecommerce app, you could use `app://products/1` to deep link to your app and open the product detail page for a product with id 1. You can think of these kind of like URLs on the web, but with one crucial distinction:
+
+Deep links are not secure and you should never send any sensitive information in them.
+
+The reason deep links are not secure is because there is no centralized method of registering URL schemes. As an application developer, you can use almost any url scheme you choose by [configuring it in Xcode](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app) for iOS or [adding an intent on Android](https://developer.android.com/training/app-links/deep-linking).
+
+There is nothing stopping a malicious application from hijacking your deep link by also registering to the same scheme and then obtaining access to the data your link contains. Sending something like `app://products/1` is not harmful, but sending tokens is a security concern.
+
+When the operating system has two or more applications to choose from when opening a link, Android will show the user a [Disambiguation dialog](https://developer.android.com/training/basics/intents/sending#disambiguation-dialog) and ask them to choose which application to use to open the link. On iOS however, the operating system will make the choice for you, so the user will be blissfully unaware. Apple has made steps to address this issue in later iOS versions (iOS 11) where they instituted a first-come-first-served principle, although this vulnerability could still be exploited in different ways which you can read more about [here](https://thehackernews.com/2019/07/ios-custom-url-scheme.html). Using [universal links](https://developer.apple.com/ios/universal-links/) will allow linking to content within your app securely in iOS.
+
+### OAuth2 and Redirects
+
+The OAuth2 authentication protocol is incredibly popular nowadays, prided as the most complete and secure protocol around. The OpenID Connect protocol is also based on this. In OAuth2, the user is asked to authenticate via a third party. On successful completion, this third party redirects back to the requesting application with a verification code which can be exchanged for a JWT — a [JSON Web Token](https://jwt.io/introduction/). JWT is an open standard for securely transmitting information between parties on the web.
+
+On the web, this redirect step is secure, because URLs on the web are guaranteed to be unique. This is not true for apps because, as mentioned earlier, there is no centralized method of registering URL schemes! In order to address this security concern, an additional check must be added in the form of PKCE.
+
+[PKCE](https://oauth.net/2/pkce/), pronounced “Pixy” stands for Proof of Key Code Exchange, and is an extension to the OAuth 2 spec. This involves adding an additional layer of security which verifies that the authentication and token exchange requests come from the same client. PKCE uses the [SHA 256](https://www.movable-type.co.uk/scripts/sha256.html) Cryptographic Hash Algorithm. SHA 256 creates a unique “signature” for a text or file of any size, but it is:
+
+- Always the same length regardless of the input file
+- Guaranteed to always produce the same result for the same input
+- One way (that is, you can’t reverse engineer it to reveal the original input)
+
+Now you have two values:
+
+- **code_verifier** - a large random string generated by the client
+- **code_challenge** - the SHA 256 of the code_verifier
+
+During the initial `/authorize` request, the client also sends the `code_challenge` for the `code_verifier` it keeps in memory. After the authorize request has returned correctly, the client also sends the `code_verifier` that was used to generate the `code_challenge`. The IDP will then calculate the `code_challenge`, see if it matches what was set on the very first `/authorize` request, and only send the access token if the values match.
+
+This guarantees that only the application that triggered the initial authorization flow would be able to successfully exchange the verification code for a JWT. So even if a malicious application gets access to the verification code, it will be useless on its own. To see this in action, check out [this example](https://aaronparecki.com/oauth-2-simplified/#mobile-apps).
+
+A library to consider for native OAuth is [react-native-app-auth](https://github.com/FormidableLabs/react-native-app-auth). React-native-app-auth is an SDK for communicating with OAuth2 providers. It wraps the native [AppAuth-iOS](https://github.com/openid/AppAuth-iOS) and [AppAuth-Android](https://github.com/openid/AppAuth-Android) libraries and can support PKCE.
+
+:::note
+`react-native-app-auth` can support PKCE only if your Identity Provider supports it.
+:::
+
+
+
+## Network Security
+
+Your APIs should always use [SSL encryption](https://www.ssl.com/faqs/faq-what-is-ssl/). SSL encryption protects against the requested data being read in plain text between when it leaves the server and before it reaches the client. You’ll know the endpoint is secure, because it starts with `https://` instead of `http://`.
+
+### SSL Pinning
+
+Using https endpoints could still leave your data vulnerable to interception. With https, the client will only trust the server if it can provide a valid certificate that is signed by a trusted Certificate Authority that is pre-installed on the client. An attacker could take advantage of this by installing a malicious root CA certificate to the user’s device, so the client would trust all certificates that are signed by the attacker. Thus, relying on certificates alone could still leave you vulnerable to a [man-in-the-middle attack](https://en.wikipedia.org/wiki/Man-in-the-middle_attack).
+
+**SSL pinning** is a technique that can be used on the client side to avoid this attack. It works by embedding (or pinning) a list of trusted certificates to the client during development, so that only the requests signed with one of the trusted certificates will be accepted, and any self-signed certificates will not be.
+
+:::warning Caution
+When using SSL pinning, you should be mindful of certificate expiry. Certificates expire every 1-2 years and when one does, it’ll need to be updated in the app as well as on the server. As soon as the certificate on the server has been updated, any apps with the old certificate embedded in them will cease to work.
+:::
+
+## Summary
+
+There is no bulletproof way to handle security, but with conscious effort and diligence, it is possible to significantly reduce the likelihood of a security breach in your application. Invest in security proportional to the sensitivity of the data stored in your application, the number of users, and the damage a hacker could do when gaining access to their account. And remember: it’s significantly harder to access information that was never requested in the first place.
diff --git a/website/versioned_docs/version-0.86/segmentedcontrolios.md b/website/versioned_docs/version-0.86/segmentedcontrolios.md
new file mode 100644
index 00000000000..d9ede6e35e8
--- /dev/null
+++ b/website/versioned_docs/version-0.86/segmentedcontrolios.md
@@ -0,0 +1,10 @@
+---
+id: segmentedcontrolios
+title: '❌ SegmentedControlIOS'
+---
+
+:::danger[Removed from React Native]
+Use one of the [community packages](https://reactnative.directory/?search=segmentedcontrol) instead.
+:::
+
+---
diff --git a/website/versioned_docs/version-0.86/set-up-your-environment.md b/website/versioned_docs/version-0.86/set-up-your-environment.md
new file mode 100644
index 00000000000..f9fb917105a
--- /dev/null
+++ b/website/versioned_docs/version-0.86/set-up-your-environment.md
@@ -0,0 +1,108 @@
+---
+id: set-up-your-environment
+title: Set Up Your Environment
+hide_table_of_contents: true
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import constants from '@site/core/TabsConstants';
+
+import GuideLinuxAndroid from './\_getting-started-linux-android.md';
+import GuideMacOSAndroid from './\_getting-started-macos-android.md';
+import GuideWindowsAndroid from './\_getting-started-windows-android.md';
+import GuideMacOSIOS from './\_getting-started-macos-ios.md';
+
+In this guide, you'll learn how to set up your environment, so that you can run your project with Android Studio and Xcode. This will allow you to develop with Android emulators and iOS simulators, build your app locally, and more.
+
+:::info
+This guide requires Android Studio or Xcode. If you already have one of these programs installed, you should be able to get up and running within a few minutes. If they are not installed, you should expect to spend about an hour installing and configuring them.
+
+
+Is setting up my environment required?
+
+Setting up your environment is not required if you're using a [Framework](/architecture/glossary#react-native-framework). With a React Native Framework, you don't need to set up Android Studio or Xcode as it will take care of building the native app for you
+
+If you have constraints that prevent you from using a Framework, or you'd like to write your own Framework, then setting up your local environment is a requirement. After your environment is set up, learn how to [get started without a framework](getting-started-without-a-framework).
+
+
+:::
+
+#### Development OS
+
+
+
+
+#### Target OS
+
+
+
+
+[//]: # 'macOS, Android'
+
+
+
+
+
+
+[//]: # 'macOS, iOS'
+
+
+
+
+
+
+
+
+
+#### Target OS
+
+
+
+
+[//]: # 'Windows, Android'
+
+
+
+
+
+
+[//]: # 'Windows, iOS'
+
+## Unsupported
+
+:::info
+A Mac is required to build projects with native code for iOS. You can use [Expo Go](https://expo.dev/go) from [Expo](environment-setup#start-a-new-react-native-project-with-expo) to develop your app on your iOS device.
+:::
+
+
+
+
+
+
+
+#### Target OS
+
+
+
+
+[//]: # 'Linux, Android'
+
+
+
+
+
+
+[//]: # 'Linux, iOS'
+
+## Unsupported
+
+:::info
+A Mac is required to build projects with native code for iOS. You can use [Expo Go](https://expo.dev/go) from [Expo](environment-setup#start-a-new-react-native-project-with-expo) to develop your app on your iOS device.
+:::
+
+
+
+
+
+
diff --git a/website/versioned_docs/version-0.86/settings.md b/website/versioned_docs/version-0.86/settings.md
new file mode 100644
index 00000000000..01c0533d813
--- /dev/null
+++ b/website/versioned_docs/version-0.86/settings.md
@@ -0,0 +1,103 @@
+---
+id: settings
+title: Settings
+---
+
+`Settings` serves as a wrapper for [`NSUserDefaults`](https://developer.apple.com/documentation/foundation/nsuserdefaults), a persistent key-value store available only on iOS.
+
+## Example
+
+```SnackPlayer name=Settings%20Example&supportedPlatforms=ios
+import React, {useState} from 'react';
+import {Button, Settings, StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => {
+ const [data, setData] = useState(() => Settings.get('data'));
+
+ return (
+
+
+ Stored value:
+ {data}
+ {
+ Settings.set({data: 'React'});
+ setData(Settings.get('data'));
+ }}
+ title="Store 'React'"
+ />
+ {
+ Settings.set({data: 'Native'});
+ setData(Settings.get('data'));
+ }}
+ title="Store 'Native'"
+ />
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ value: {
+ fontSize: 24,
+ marginVertical: 12,
+ },
+});
+
+export default App;
+```
+
+---
+
+# Reference
+
+## Methods
+
+### `clearWatch()`
+
+```tsx
+static clearWatch(watchId: number);
+```
+
+`watchId` is the number returned by `watchKeys()` when the subscription was originally configured.
+
+---
+
+### `get()`
+
+```tsx
+static get(key: string): any;
+```
+
+Get the current value for a given `key` in `NSUserDefaults`.
+
+---
+
+### `set()`
+
+```tsx
+static set(settings: Record);
+```
+
+Set one or more values in `NSUserDefaults`.
+
+---
+
+### `watchKeys()`
+
+```tsx
+static watchKeys(keys: string | array, callback: () => void): number;
+```
+
+Subscribe to be notified when the value for any of the keys specified by the `keys` parameter has been changed in `NSUserDefaults`. Returns a `watchId` number that may be used with `clearWatch()` to unsubscribe.
+
+:::note
+`watchKeys()` by design ignores internal `set()` calls and fires callback only on changes preformed outside of React Native code.
+:::
diff --git a/website/versioned_docs/version-0.86/shadow-props.md b/website/versioned_docs/version-0.86/shadow-props.md
new file mode 100644
index 00000000000..d5e8a037059
--- /dev/null
+++ b/website/versioned_docs/version-0.86/shadow-props.md
@@ -0,0 +1,285 @@
+---
+id: shadow-props
+title: Shadow Props
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+
+
+
+```SnackPlayer name=Shadow%20Props&supportedPlatforms=ios&ext=js&dependencies=@react-native-community/slider
+import React, {useState} from 'react';
+import {Text, View, StyleSheet} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+import Slider from '@react-native-community/slider';
+
+const ShadowPropSlider = ({label, value, ...props}) => {
+ return (
+ <>
+
+ {label} ({value.toFixed(2)})
+
+
+ >
+ );
+};
+
+const App = () => {
+ const [shadowOffsetWidth, setShadowOffsetWidth] = useState(0);
+ const [shadowOffsetHeight, setShadowOffsetHeight] = useState(0);
+ const [shadowRadius, setShadowRadius] = useState(0);
+ const [shadowOpacity, setShadowOpacity] = useState(0.1);
+
+ return (
+
+
+
+
+
+
+
+ setShadowOpacity(val)}
+ />
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'space-around',
+ backgroundColor: '#ecf0f1',
+ padding: 8,
+ },
+ square: {
+ alignSelf: 'center',
+ backgroundColor: 'white',
+ borderRadius: 4,
+ height: 150,
+ shadowColor: 'black',
+ width: 150,
+ },
+ controls: {
+ paddingHorizontal: 12,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=Shadow%20Props&supportedPlatforms=ios&ext=tsx&dependencies=@react-native-community/slider
+import React, {useState} from 'react';
+import {Text, View, StyleSheet} from 'react-native';
+import Slider, {SliderProps} from '@react-native-community/slider';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+type ShadowPropSliderProps = SliderProps & {
+ label: string;
+};
+
+const ShadowPropSlider = ({label, value, ...props}: ShadowPropSliderProps) => {
+ return (
+ <>
+
+ {label} ({value?.toFixed(2)})
+
+
+ >
+ );
+};
+
+const App = () => {
+ const [shadowOffsetWidth, setShadowOffsetWidth] = useState(0);
+ const [shadowOffsetHeight, setShadowOffsetHeight] = useState(0);
+ const [shadowRadius, setShadowRadius] = useState(0);
+ const [shadowOpacity, setShadowOpacity] = useState(0.1);
+
+ return (
+
+
+
+
+
+
+
+ setShadowOpacity(val)}
+ />
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'space-around',
+ backgroundColor: '#ecf0f1',
+ padding: 8,
+ },
+ square: {
+ alignSelf: 'center',
+ backgroundColor: 'white',
+ borderRadius: 4,
+ height: 150,
+ shadowColor: 'black',
+ width: 150,
+ },
+ controls: {
+ paddingHorizontal: 12,
+ },
+});
+
+export default App;
+```
+
+
+
+
+---
+
+# Reference
+
+There are 3 sets of shadow APIs in React Native:
+
+- `boxShadow`: A View style prop and a spec-compliant implementation of the [web style prop of the same name](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow).
+- `dropShadow`: A specific filter function available as part of the [`filter`](./view-style-props#filter) View style prop.
+- Various `shadow` props (`shadowColor`, `shadowOffset`, `shadowOpacity`, `shadowRadius`): These map directly to their native counterparts exposed by the platform-level APIs.
+
+The difference between `dropShadow` and `boxShadow` are as follows:
+
+- `dropShadow` exists as part of `filter`, whereas `boxShadow` is a standalone style prop.
+- `dropShadow` is an alpha mask, so only pixels with a positive alpha value will "cast" a shadow. `boxShadow` will cast around the border box of the element no matter it's contents (unless it is inset).
+- `dropShadow` is only available on Android, `boxShadow` is available on iOS and Android.
+- `dropShadow` cannot be inset like `boxShadow`.
+- `dropShadow` does not have the `spreadDistance` argument like `boxShadow`.
+
+Both `boxShadow` and `dropShadow` are generally more capable than the `shadow` props. The `shadow` props, however, map to native platform-level APIs, so if you only need a straightforward shadow these props are recommended. Note that only `shadowColor` works on both Android and iOS, all other `shadow` props only work on iOS.
+
+## Props
+
+### `boxShadow`
+
+See [View Style Props](./view-style-props#boxshadow) for documentation.
+
+### `dropShadow`
Android
+
+See [View Style Props](./view-style-props#filter) for documentation.
+
+### `shadowColor`
+
+Sets the drop shadow color.
+
+This property will only work on Android API 28 and above. For similar functionality on lower Android APIs, use the [`elevation` property](view-style-props#elevation-android).
+
+| Type |
+| ------------------ |
+| [color](colors.md) |
+
+---
+
+### `shadowOffset`
iOS
+
+Sets the drop shadow offset.
+
+| Type |
+| ---------------------------------------- |
+| object: `{width: number,height: number}` |
+
+---
+
+### `shadowOpacity`
iOS
+
+Sets the drop shadow opacity (multiplied by the color's alpha component).
+
+| Type |
+| ------ |
+| number |
+
+---
+
+### `shadowRadius`
iOS
+
+Sets the drop shadow blur radius.
+
+| Type |
+| ------ |
+| number |
diff --git a/website/versioned_docs/version-0.86/share.md b/website/versioned_docs/version-0.86/share.md
new file mode 100644
index 00000000000..1fc5823361f
--- /dev/null
+++ b/website/versioned_docs/version-0.86/share.md
@@ -0,0 +1,136 @@
+---
+id: share
+title: Share
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+## Example
+
+
+
+
+```SnackPlayer name=Example&supportedPlatforms=ios,android&ext=js
+import React from 'react';
+import {Alert, Share, Button} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const ShareExample = () => {
+ const onShare = async () => {
+ try {
+ const result = await Share.share({
+ message:
+ 'React Native | A framework for building native apps using React',
+ });
+ if (result.action === Share.sharedAction) {
+ if (result.activityType) {
+ // shared with activity type of result.activityType
+ } else {
+ // shared
+ }
+ } else if (result.action === Share.dismissedAction) {
+ // dismissed
+ }
+ } catch (error) {
+ Alert.alert(error.message);
+ }
+ };
+ return (
+
+
+
+
+
+ );
+};
+
+export default ShareExample;
+```
+
+
+
+
+```SnackPlayer name=Example&supportedPlatforms=ios,android&ext=tsx
+import React from 'react';
+import {Alert, Share, Button} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const ShareExample = () => {
+ const onShare = async () => {
+ try {
+ const result = await Share.share({
+ message:
+ 'React Native | A framework for building native apps using React',
+ });
+ if (result.action === Share.sharedAction) {
+ if (result.activityType) {
+ // shared with activity type of result.activityType
+ } else {
+ // shared
+ }
+ } else if (result.action === Share.dismissedAction) {
+ // dismissed
+ }
+ } catch (error: any) {
+ Alert.alert(error.message);
+ }
+ };
+ return (
+
+
+
+
+
+ );
+};
+
+export default ShareExample;
+```
+
+
+
+
+# Reference
+
+## Methods
+
+### `share()`
+
+```tsx
+static share(content: ShareContent, options?: ShareOptions);
+```
+
+Open a dialog to share text content.
+
+In iOS, returns a Promise which will be invoked with an object containing `action` and `activityType`. If the user dismissed the dialog, the Promise will still be resolved with action being `Share.dismissedAction` and all the other keys being undefined. Note that some share options will not appear or work on the iOS simulator.
+
+In Android, returns a Promise which will always be resolved with action being `Share.sharedAction`.
+
+**Properties:**
+
+| Name | Type | Description |
+| ------------------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| content
Required
| object | `message` - a message to share `url` - a URL to share
iOS
`title` - title of the message
Android
At least one of `url` and `message` is required. |
+| options | object | `dialogTitle`
Android
`excludedActivityTypes`
iOS
`subject` - a subject to share via email
iOS
`tintColor`
iOS
`anchor` - the node to which the action sheet should be anchored (used for iPad)
+
+```tsx
+static dismissedAction: 'dismissedAction';
+```
+
+The dialog has been dismissed.
diff --git a/website/versioned_docs/version-0.86/signed-apk-android.md b/website/versioned_docs/version-0.86/signed-apk-android.md
new file mode 100644
index 00000000000..c5158f4aab0
--- /dev/null
+++ b/website/versioned_docs/version-0.86/signed-apk-android.md
@@ -0,0 +1,196 @@
+---
+id: signed-apk-android
+title: Publishing to Google Play Store
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Android requires that all apps be digitally signed with a certificate before they can be installed. In order to distribute your Android application via [Google Play store](https://play.google.com/store) it needs to be signed with a release key that then needs to be used for all future updates. Since 2017 it is possible for Google Play to manage signing releases automatically thanks to [App Signing by Google Play](https://developer.android.com/studio/publish/app-signing#app-signing-google-play) functionality. However, before your application binary is uploaded to Google Play it needs to be signed with an upload key. The [Signing Your Applications](https://developer.android.com/tools/publishing/app-signing.html) page on Android Developers documentation describes the topic in detail. This guide covers the process in brief, as well as lists the steps required to package the JavaScript bundle.
+
+:::info
+If you are using Expo, read the Expo guide for [Deploying to App Stores](https://docs.expo.dev/distribution/app-stores/) to build and submit your app for the Google Play Store. This guide works with any React Native app to automate the deployment process.
+:::
+
+## Generating an upload key
+
+You can generate a private signing key using `keytool`.
+
+### Windows
+
+On Windows `keytool` must be run from `C:\Program Files\Java\jdkx.x.x_x\bin`, as administrator.
+
+```shell
+keytool -genkeypair -v -storetype PKCS12 -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
+```
+
+This command prompts you for passwords for the keystore and key and for the Distinguished Name fields for your key. It then generates the keystore as a file called `my-upload-key.keystore`.
+
+The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app, so remember to take note of the alias.
+
+### macOS
+
+On macOS, if you're not sure where your JDK bin folder is, then perform the following command to find it:
+
+```shell
+/usr/libexec/java_home
+```
+
+It will output the directory of the JDK, which will look something like this:
+
+```shell
+/Library/Java/JavaVirtualMachines/jdkX.X.X_XXX.jdk/Contents/Home
+```
+
+Navigate to that directory by using the command `cd /your/jdk/path` and use the keytool command with sudo permission as shown below.
+
+```shell
+sudo keytool -genkey -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
+```
+
+:::caution
+Remember to keep the keystore file private. In case you've lost upload key or it's been compromised you should [follow these instructions](https://support.google.com/googleplay/android-developer/answer/7384423#reset).
+:::
+
+## Setting up Gradle variables
+
+1. Place the `my-upload-key.keystore` file under the `android/app` directory in your project folder.
+2. Edit the file `~/.gradle/gradle.properties` or `android/gradle.properties`, and add the following (replace `*****` with the correct keystore password, alias and key password),
+
+```
+MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
+MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
+MYAPP_UPLOAD_STORE_PASSWORD=*****
+MYAPP_UPLOAD_KEY_PASSWORD=*****
+```
+
+These are going to be global Gradle variables, which we can later use in our Gradle config to sign our app.
+
+:::note[Note about using git]
+Saving the above Gradle variables in `~/.gradle/gradle.properties` instead of `android/gradle.properties` prevents them from being checked in to git. You may have to create the `~/.gradle/gradle.properties` file in your user's home directory before you can add the variables.
+:::
+
+:::note[Note about security]
+If you are not keen on storing your passwords in plaintext, and you are running macOS, you can also [store your credentials in the Keychain Access app](https://pilloxa.gitlab.io/posts/safer-passwords-in-gradle/). Then you can skip the two last rows in `~/.gradle/gradle.properties`.
+:::
+
+## Adding signing config to your app's Gradle config
+
+The last configuration step that needs to be done is to setup release builds to be signed using upload key. Edit the file `android/app/build.gradle` in your project folder, and add the signing config,
+
+```groovy
+...
+android {
+ ...
+ defaultConfig { ... }
+ signingConfigs {
+ release {
+ if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
+ storeFile file(MYAPP_UPLOAD_STORE_FILE)
+ storePassword MYAPP_UPLOAD_STORE_PASSWORD
+ keyAlias MYAPP_UPLOAD_KEY_ALIAS
+ keyPassword MYAPP_UPLOAD_KEY_PASSWORD
+ }
+ }
+ }
+ buildTypes {
+ release {
+ ...
+ signingConfig signingConfigs.release
+ }
+ }
+}
+...
+```
+
+## Generating the release AAB
+
+Run the following command in a terminal:
+
+```shell
+npx react-native build-android --mode=release
+```
+
+This command uses Gradle's `bundleRelease` under the hood that bundles all the JavaScript needed to run your app into the AAB ([Android App Bundle](https://developer.android.com/guide/app-bundle)). If you need to change the way the JavaScript bundle and/or drawable resources are bundled (e.g. if you changed the default file/folder names or the general structure of the project), have a look at `android/app/build.gradle` to see how you can update it to reflect these changes.
+
+:::note
+Make sure `gradle.properties` does not include `org.gradle.configureondemand=true` as that will make the release build skip bundling JS and assets into the app binary.
+:::
+
+The generated AAB can be found under `android/app/build/outputs/bundle/release/app-release.aab`, and is ready to be uploaded to Google Play.
+
+In order for Google Play to accept AAB format the App Signing by Google Play needs to be configured for your application on the Google Play Console. If you are updating an existing app that doesn't use App Signing by Google Play, please check our [migration section](#migrating-old-android-react-native-apps-to-use-app-signing-by-google-play) to learn how to perform that configuration change.
+
+## Testing the release build of your app
+
+Before uploading the release build to the Play Store, make sure you test it thoroughly. First uninstall any previous version of the app you already have installed. Install it on the device using the following command in the project root:
+
+
+
+
+```shell
+npm run android -- --mode="release"
+```
+
+
+
+
+```shell
+yarn android --mode release
+```
+
+
+
+
+Note that `--mode release` is only available if you've set up signing as described above.
+
+You can terminate any running bundler instances, since all your framework and JavaScript code is bundled in the APK's assets.
+
+## Publishing to other stores
+
+By default, the generated APK has the native code for both `x86`, `x86_64`, `ARMv7a` and `ARM64-v8a` CPU architectures. This makes it easier to share APKs that run on almost all Android devices. However, this has the downside that there will be some unused native code on any device, leading to unnecessarily bigger APKs.
+
+You can create an APK for each CPU by adding the following line in your `android/app/build.gradle` file:
+
+```diff
+android {
+
+ splits {
+ abi {
+ reset()
+ enable true
+ universalApk false
+ include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
+ }
+ }
+
+}
+```
+
+Upload these files to markets which support device targeting, such as [Amazon AppStore](https://developer.amazon.com/docs/app-submission/device-filtering-and-compatibility.html) or [F-Droid](https://f-droid.org/en/), and the users will automatically get the appropriate APK. If you want to upload to other markets, such as [APKFiles](https://www.apkfiles.com/), which do not support multiple APKs for a single app, change the `universalApk false` line to `true` to create the default universal APK with binaries for both CPUs.
+
+Please note that you will also have to configure distinct version codes, as [suggested in this page](https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions) from the official Android documentation.
+
+## Enabling Proguard to reduce the size of the APK (optional)
+
+Proguard is a tool that can slightly reduce the size of the APK. It does this by stripping parts of the React Native Java bytecode (and its dependencies) that your app is not using.
+
+:::caution[Important]
+Make sure to thoroughly test your app if you've enabled Proguard. Proguard often requires configuration specific to each native library you're using. See `app/proguard-rules.pro`.
+:::
+
+To enable Proguard, edit `android/app/build.gradle`:
+
+```groovy
+/**
+ * Run Proguard to shrink the Java bytecode in release builds.
+ */
+def enableProguardInReleaseBuilds = true
+```
+
+## Migrating old Android React Native apps to use App Signing by Google Play
+
+If you are migrating from previous version of React Native chances are your app does not use App Signing by Google Play feature. We recommend you enable that in order to take advantage from things like automatic app splitting. In order to migrate from the old way of signing you need to start by [generating new upload key](#generating-an-upload-key) and then replacing release signing config in `android/app/build.gradle` to use the upload key instead of the release one (see section about [adding signing config to gradle](#adding-signing-config-to-your-apps-gradle-config)). Once that's done you should follow the [instructions from Google Play Help website](https://support.google.com/googleplay/android-developer/answer/7384423) in order to send your original release key to Google Play.
+
+## Default Permissions
+
+By default, `INTERNET` permission is added to your Android app as pretty much all apps use it. `SYSTEM_ALERT_WINDOW` permission is added to your Android APK in debug mode but it will be removed in production.
diff --git a/website/versioned_docs/version-0.86/state.md b/website/versioned_docs/version-0.86/state.md
new file mode 100644
index 00000000000..bc162f44b40
--- /dev/null
+++ b/website/versioned_docs/version-0.86/state.md
@@ -0,0 +1,103 @@
+---
+id: state
+title: State
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+There are two types of data that control a component: `props` and `state`. `props` are set by the parent and they are fixed throughout the lifetime of a component. For data that is going to change, we have to use `state`.
+
+In general, you should initialize `state` in the constructor, and then call `setState` when you want to change it.
+
+For example, let's say we want to make text that blinks all the time. The text itself gets set once when the blinking component gets created, so the text itself is a `prop`. The "whether the text is currently on or off" changes over time, so that should be kept in `state`.
+
+
+
+
+```SnackPlayer name=State&ext=js
+import React, {useState, useEffect} from 'react';
+import {Text, View} from 'react-native';
+
+const Blink = props => {
+ const [isShowingText, setIsShowingText] = useState(true);
+
+ useEffect(() => {
+ const toggle = setInterval(() => {
+ setIsShowingText(!isShowingText);
+ }, 1000);
+
+ return () => clearInterval(toggle);
+ });
+
+ if (!isShowingText) {
+ return null;
+ }
+
+ return {props.text};
+};
+
+const BlinkApp = () => {
+ return (
+
+
+
+
+
+
+ );
+};
+
+export default BlinkApp;
+```
+
+
+
+
+```SnackPlayer name=State&ext=tsx
+import React, {useState, useEffect} from 'react';
+import {Text, View} from 'react-native';
+
+type BlinkProps = {
+ text: string;
+};
+
+const Blink = (props: BlinkProps) => {
+ const [isShowingText, setIsShowingText] = useState(true);
+
+ useEffect(() => {
+ const toggle = setInterval(() => {
+ setIsShowingText(!isShowingText);
+ }, 1000);
+
+ return () => clearInterval(toggle);
+ });
+
+ if (!isShowingText) {
+ return null;
+ }
+
+ return {props.text};
+};
+
+const BlinkApp = () => {
+ return (
+
+
+
+
+
+
+ );
+};
+
+export default BlinkApp;
+```
+
+
+
+
+In a real application, you probably won't be setting state with a timer. You might set state when you have new data from the server, or from user input. You can also use a state container like [Redux](https://redux.js.org/) or [MobX](https://mobx.js.org/) to control your data flow. In that case you would use Redux or MobX to modify your state rather than calling `setState` directly.
+
+When setState is called, BlinkApp will re-render its Component. By calling setState within the Timer, the component will re-render every time the Timer ticks.
+
+State works the same way as it does in React, so for more details on handling state, you can look at the [React.Component API](https://react.dev/reference/react/Component#setstate). At this point, you may have noticed that most of our examples use the default text color. To customize the text color, you will have to [learn about Style](style.md).
diff --git a/website/versioned_docs/version-0.86/statusbar.md b/website/versioned_docs/version-0.86/statusbar.md
new file mode 100644
index 00000000000..6345e7bf4ef
--- /dev/null
+++ b/website/versioned_docs/version-0.86/statusbar.md
@@ -0,0 +1,513 @@
+---
+id: statusbar
+title: StatusBar
+---
+
+import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
+
+Component to control the app's status bar. The status bar is the zone, typically at the top of the screen, that displays the current time, Wi-Fi and cellular network information, battery level and/or other status icons.
+
+### Usage with Navigator
+
+It is possible to have multiple `StatusBar` components mounted at the same time. The props will be merged in the order the `StatusBar` components were mounted.
+
+
+
+
+```SnackPlayer name=StatusBar%20Component%20Example&supportedPlatforms=android,ios&ext=js
+import React, {useState} from 'react';
+import {
+ Button,
+ Platform,
+ StatusBar,
+ StyleSheet,
+ Text,
+ View,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const STYLES = ['default', 'dark-content', 'light-content'];
+const TRANSITIONS = ['fade', 'slide', 'none'];
+
+const App = () => {
+ const [hidden, setHidden] = useState(false);
+ const [statusBarStyle, setStatusBarStyle] = useState(STYLES[0]);
+ const [statusBarTransition, setStatusBarTransition] = useState(
+ TRANSITIONS[0],
+ );
+
+ const changeStatusBarVisibility = () => setHidden(!hidden);
+
+ const changeStatusBarStyle = () => {
+ const styleId = STYLES.indexOf(statusBarStyle) + 1;
+ if (styleId === STYLES.length) {
+ setStatusBarStyle(STYLES[0]);
+ } else {
+ setStatusBarStyle(STYLES[styleId]);
+ }
+ };
+
+ const changeStatusBarTransition = () => {
+ const transition = TRANSITIONS.indexOf(statusBarTransition) + 1;
+ if (transition === TRANSITIONS.length) {
+ setStatusBarTransition(TRANSITIONS[0]);
+ } else {
+ setStatusBarTransition(TRANSITIONS[transition]);
+ }
+ };
+
+ return (
+
+
+
+
+ StatusBar Visibility:{'\n'}
+ {hidden ? 'Hidden' : 'Visible'}
+
+
+ StatusBar Style:{'\n'}
+ {statusBarStyle}
+
+ {Platform.OS === 'ios' ? (
+
+ StatusBar Transition:{'\n'}
+ {statusBarTransition}
+
+ ) : null}
+
+
+
+ {Platform.OS === 'ios' ? (
+
+ ) : null}
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ backgroundColor: '#ECF0F1',
+ },
+ buttonsContainer: {
+ padding: 10,
+ },
+ textStyle: {
+ textAlign: 'center',
+ marginBottom: 8,
+ },
+});
+
+export default App;
+```
+
+
+
+
+```SnackPlayer name=StatusBar%20Component%20Example&supportedPlatforms=android,ios&ext=tsx
+import React, {useState} from 'react';
+import {
+ Button,
+ Platform,
+ StatusBar,
+ StyleSheet,
+ Text,
+ View,
+ StatusBarStyle,
+} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const STYLES = ['default', 'dark-content', 'light-content'] as const;
+const TRANSITIONS = ['fade', 'slide', 'none'] as const;
+
+const App = () => {
+ const [hidden, setHidden] = useState(false);
+ const [statusBarStyle, setStatusBarStyle] = useState(
+ STYLES[0],
+ );
+ const [statusBarTransition, setStatusBarTransition] = useState<
+ 'fade' | 'slide' | 'none'
+ >(TRANSITIONS[0]);
+
+ const changeStatusBarVisibility = () => setHidden(!hidden);
+
+ const changeStatusBarStyle = () => {
+ const styleId = STYLES.indexOf(statusBarStyle) + 1;
+ if (styleId === STYLES.length) {
+ setStatusBarStyle(STYLES[0]);
+ } else {
+ setStatusBarStyle(STYLES[styleId]);
+ }
+ };
+
+ const changeStatusBarTransition = () => {
+ const transition = TRANSITIONS.indexOf(statusBarTransition) + 1;
+ if (transition === TRANSITIONS.length) {
+ setStatusBarTransition(TRANSITIONS[0]);
+ } else {
+ setStatusBarTransition(TRANSITIONS[transition]);
+ }
+ };
+
+ return (
+
+
+
+
+ StatusBar Visibility:{'\n'}
+ {hidden ? 'Hidden' : 'Visible'}
+
+
+ StatusBar Style:{'\n'}
+ {statusBarStyle}
+
+ {Platform.OS === 'ios' ? (
+
+ StatusBar Transition:{'\n'}
+ {statusBarTransition}
+
+ ) : null}
+
+
+
+ {Platform.OS === 'ios' ? (
+
+ ) : null}
+
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ backgroundColor: '#ECF0F1',
+ },
+ buttonsContainer: {
+ padding: 10,
+ },
+ textStyle: {
+ textAlign: 'center',
+ marginBottom: 8,
+ },
+});
+
+export default App;
+```
+
+
+
+
+### Imperative API
+
+For cases where using a component is not ideal, there is also an imperative API exposed as static functions on the component. It is however not recommended to use the static API and the component for the same prop because any value set by the static API will get overridden by the one set by the component in the next render.
+
+---
+
+# Reference
+
+## Constants
+
+### `currentHeight`
Android
+
+The height of the status bar, which includes the notch height, if present.
+
+---
+
+## Props
+
+### `animated`
+
+If the transition between status bar property changes should be animated. Supported for `backgroundColor`, `barStyle` and `hidden` properties.
+
+| Type | Required | Default |
+| ------- | -------- | ------- |
+| boolean | No | `false` |
+
+---
+
+### `backgroundColor`
Android
+
+The background color of the status bar.
+
+:::warning
+Due to edge-to-edge enforcement introduced in Android 15, setting background color of the status bar is deprecated in API level 35 and setting it will have no effect. You can read more about our [edge-to-edge recommendations here](https://github.com/react-native-community/discussions-and-proposals/discussions/827).
+:::
+
+| Type | Required | Default |
+| --------------- | -------- | ---------------------------------------------------------------------- |
+| [color](colors) | No | default system StatusBar background color, or `'black'` if not defined |
+
+---
+
+### `barStyle`
+
+Sets the color of the status bar text.
+
+On Android, this will only have an impact on API versions 23 and above.
+
+| Type | Required | Default |
+| ------------------------------------------ | -------- | ----------- |
+| [StatusBarStyle](statusbar#statusbarstyle) | No | `'default'` |
+
+---
+
+### `hidden`
+
+If the status bar is hidden.
+
+| Type | Required | Default |
+| ------- | -------- | ------- |
+| boolean | No | `false` |
+
+---
+
+### `networkActivityIndicatorVisible`
iOS
+
+If the network activity indicator should be visible.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+---
+
+### `showHideTransition`
iOS
+
+The transition effect when showing and hiding the status bar using the `hidden` prop.
+
+| Type | Default |
+| -------------------------------------------------- | -------- |
+| [StatusBarAnimation](statusbar#statusbaranimation) | `'fade'` |
+
+---
+
+### `translucent`
Android
+
+If the status bar is translucent. When translucent is set to `true`, the app will draw under the status bar. This is useful when using a semi transparent status bar color.
+
+:::warning
+Due to edge-to-edge enforcement introduced in Android 15, setting the status bar as translucent is deprecated in API level 35 and setting it will have no effect. You can read more about our [edge-to-edge recommendations here](https://github.com/react-native-community/discussions-and-proposals/discussions/827).
+:::
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
+
+## Methods
+
+### `popStackEntry()`
+
+```tsx
+static popStackEntry(entry: StatusBarProps);
+```
+
+Get and remove the last StatusBar entry from the stack.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------- | ---- | ------------------------------------- |
+| entry
Required
| any | Entry returned from `pushStackEntry`. |
+
+---
+
+### `pushStackEntry()`
+
+```tsx
+static pushStackEntry(props: StatusBarProps): StatusBarProps;
+```
+
+Push a StatusBar entry onto the stack. The return value should be passed to `popStackEntry` when complete.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------- | ---- | ---------------------------------------------------------------- |
+| props
Required
| any | Object containing the StatusBar props to use in the stack entry. |
+
+---
+
+### `replaceStackEntry()`
+
+```tsx
+static replaceStackEntry(
+ entry: StatusBarProps,
+ props: StatusBarProps
+): StatusBarProps;
+```
+
+Replace an existing StatusBar stack entry with new props.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------- | ---- | ---------------------------------------------------------------------------- |
+| entry
Required
| any | Entry returned from `pushStackEntry` to replace. |
+| props
Required
| any | Object containing the StatusBar props to use in the replacement stack entry. |
+
+---
+
+### `setBackgroundColor()`
Android
+
+```tsx
+static setBackgroundColor(color: ColorValue, animated?: boolean);
+```
+
+Set the background color for the status bar.
+
+:::warning
+Due to edge-to-edge enforcement introduced in Android 15, setting background color of the status bar is deprecated in API level 35 and setting it will have no effect. You can read more about our [edge-to-edge recommendations here](https://github.com/react-native-community/discussions-and-proposals/discussions/827).
+:::
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------- | ------- | ------------------------- |
+| color
Required
| string | Background color. |
+| animated | boolean | Animate the style change. |
+
+---
+
+### `setBarStyle()`
+
+```tsx
+static setBarStyle(style: StatusBarStyle, animated?: boolean);
+```
+
+Set the status bar style.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------- | ------------------------------------------ | ------------------------- |
+| style
Required
| [StatusBarStyle](statusbar#statusbarstyle) | Status bar style to set. |
+| animated | boolean | Animate the style change. |
+
+---
+
+### `setHidden()`
+
+```tsx
+static setHidden(hidden: boolean, animation?: StatusBarAnimation);
+```
+
+Show or hide the status bar.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ----------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------- |
+| hidden
Required
| boolean | Hide the status bar. |
+| animation
iOS
| [StatusBarAnimation](statusbar#statusbaranimation) | Animation when changing the status bar hidden property. |
+
+---
+
+### 🗑️ `setNetworkActivityIndicatorVisible()`
iOS
+
+:::warning Deprecated
+The status bar network activity indicator is not supported in iOS 13 and later. This will be removed in a future release.
+:::
+
+```tsx
+static setNetworkActivityIndicatorVisible(visible: boolean);
+```
+
+Control the visibility of the network activity indicator.
+
+**Parameters:**
+
+| Name | Type | Description |
+| ------------------------------------------------------------ | ------- | ------------------- |
+| visible
Required
| boolean | Show the indicator. |
+
+---
+
+### `setTranslucent()`
Android
+
+```tsx
+static setTranslucent(translucent: boolean);
+```
+
+Control the translucency of the status bar.
+
+:::warning
+Due to edge-to-edge enforcement introduced in Android 15, setting the status bar as translucent is deprecated in API level 35 and setting it will have no effect. You can read more about our [edge-to-edge recommendations here](https://github.com/react-native-community/discussions-and-proposals/discussions/827).
+:::
+
+**Parameters:**
+
+| Name | Type | Description |
+| ---------------------------------------------------------------- | ------- | ------------------- |
+| translucent
Required
| boolean | Set as translucent. |
+
+## Type Definitions
+
+### StatusBarAnimation
+
+Status bar animation type for transitions on the iOS.
+
+| Type |
+| ---- |
+| enum |
+
+**Constants:**
+
+| Value | Type | Description |
+| --------- | ------ | --------------- |
+| `'fade'` | string | Fade animation |
+| `'slide'` | string | Slide animation |
+| `'none'` | string | No animation |
+
+---
+
+### StatusBarStyle
+
+Status bar style type.
+
+| Type |
+| ---- |
+| enum |
+
+**Constants:**
+
+| Value | Type | Description |
+| ----------------- | ------ | ---------------------------------------------------------- |
+| `'default'` | string | Default status bar style (dark for iOS, light for Android) |
+| `'light-content'` | string | White texts and icons |
+| `'dark-content'` | string | Dark texts and icons (requires API>=23 on Android) |
diff --git a/website/versioned_docs/version-0.86/statusbarios.md b/website/versioned_docs/version-0.86/statusbarios.md
new file mode 100644
index 00000000000..2b17ba436a2
--- /dev/null
+++ b/website/versioned_docs/version-0.86/statusbarios.md
@@ -0,0 +1,10 @@
+---
+id: statusbarios
+title: '❌ StatusBarIOS'
+---
+
+:::danger[Removed from React Native]
+Use [`StatusBar`](statusbar.md) for mutating the status bar.
+:::
+
+---
diff --git a/website/versioned_docs/version-0.86/strict-typescript-api.md b/website/versioned_docs/version-0.86/strict-typescript-api.md
new file mode 100644
index 00000000000..a426511835b
--- /dev/null
+++ b/website/versioned_docs/version-0.86/strict-typescript-api.md
@@ -0,0 +1,193 @@
+---
+id: strict-typescript-api
+title: Strict TypeScript API (opt in)
+---
+
+import RNRepoLink from '@site/core/RNRepoLink';
+
+The Strict TypeScript API is a preview of our future, stable JavaScript API for React Native.
+
+Specifically, this is a new set of TypeScript types for the `react-native` npm package, available from 0.80 onwards. These provide stronger and more futureproof type accuracy, and will allow us to confidently evolve React Native's API into a stable shape. Opting in to the Strict TypeScript API brings some structural type differences, and is therefore a one-time breaking change.
+
+The new types are:
+
+1. **Generated directly from our source code** — improving coverage and correctness, so you can expect stronger compatibility guarantees.
+2. **Restricted to `react-native`'s index file** — more tightly defining our public API, and meaning we won't break the API when making internal file changes.
+
+When the community is ready, the Strict TypeScript API will become our default API in future — synchronized with deep imports removal.
+
+## Opting in
+
+We're shipping these new types alongside our existing types, meaning you can choose to migrate when ready. We encourage early adopters and newly created apps to opt in via your `tsconfig.json` file.
+
+Opting in is a **breaking change**, since some of our new types have updated names and shapes, although many apps won't be affected. You can learn about each breaking change in the next section.
+
+```json title="tsconfig.json"
+{
+ "extends": "@react-native/typescript-config",
+ "compilerOptions": {
+ ...
+ "customConditions": ["react-native-strict-api"]
+ }
+}
+```
+
+:::note[Under the hood]
+
+This will instruct TypeScript to resolve `react-native` types from our new [`types_generated/`](https://www.npmjs.com/package/react-native?activeTab=code) dir, instead of the previous [`types/`](https://www.npmjs.com/package/react-native?activeTab=code) dir (manually maintained). No restart of TypeScript or your editor is required.
+
+:::
+
+The Strict TypeScript API follows our [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894) to remove deep imports from React Native. Therefore, some APIs are no longer exported at root. This is intentional, in order to reduce the overall surface area of React Native's API.
+
+:::tip[API feedback]
+
+**Sending feedback**: We will be working with the community to finalize which APIs we export over (at least) the next two React Native releases. Please share your feedback in our [feedback thread](https://github.com/react-native-community/discussions-and-proposals/discussions/893).
+
+See also our [announcement blog post](/blog/2025/06/12/moving-towards-a-stable-javascript-api) for more info on our motivation and timelines.
+
+:::
+
+## Migration guide
+
+### Codegen types should now be imported from the `react-native` package
+
+Types used for codegen, like `Int32`, `Double`, `WithDefault` etc. are now available under a single `CodegenTypes` namespace. Similarly, `codegenNativeComponent` and `codegenNativeCommands` are now available to import from the react-native package instead of using the deep import.
+
+Namespaced `CodegenTypes` as well as `codegenNativeCommands` and `codegenNativeComponent` are also available from `react-native` package when the Strict API is not enabled to make the adoption easier for third-party libraries.
+
+**Before**
+
+```ts title=""
+import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
+import type {
+ Int32,
+ WithDefault,
+} from 'react-native/Libraries/Types/CodegenTypes';
+
+interface NativeProps extends ViewProps {
+ enabled?: WithDefault;
+ size?: Int32;
+}
+
+export default codegenNativeComponent(
+ 'RNCustomComponent',
+);
+```
+
+**After**
+
+```ts title=""
+import {CodegenTypes, codegenNativeComponent} from 'react-native';
+
+interface NativeProps extends ViewProps {
+ enabled?: CodegenTypes.WithDefault;
+ size?: CodegenTypes.Int32;
+}
+
+export default codegenNativeComponent(
+ 'RNCustomComponent',
+);
+```
+
+### Removal of `*Static` types
+
+**Before**
+
+```tsx title=""
+import {Linking, LinkingStatic} from 'react-native';
+
+function foo(linking: LinkingStatic) {}
+foo(Linking);
+```
+
+**After**
+
+```tsx title=""
+import {Linking} from 'react-native';
+
+function foo(linking: Linking) {}
+foo(Linking);
+```
+
+The following APIs were previously named as `*Static` plus a variable declaration of said type. In most cases there was an alias so that value and the type were exported under the same identifier, but some were missing.
+
+(For example there was an `AlertStatic` type, `Alert` variable of type `AlertStatic` and type `Alert` which was an alias for `AlertStatic`. But in the case of `PixelRatio` there was a `PixelRatioStatic` type and a `PixelRatio` variable of that type without additional type aliases.)
+
+**Affected APIs**
+
+- `AlertStatic`
+- `ActionSheetIOSStatic`
+- `ToastAndroidStatic`
+- `InteractionManagerStatic` (In this case there was no relevant `InteractionManager` type alias)
+- `UIManagerStatic`
+- `PlatformStatic`
+- `SectionListStatic`
+- `PixelRatioStatic` (In this case there was no relevant `PixelRatio` type alias)
+- `AppStateStatic`
+- `AccessibilityInfoStatic`
+- `ImageResizeModeStatic`
+- `BackHandlerStatic`
+- `DevMenuStatic` (In this case there was no relevant `DevMenu` type alias)
+- `ClipboardStatic`
+- `PermissionsAndroidStatic`
+- `ShareStatic`
+- `DeviceEventEmitterStatic`
+- `LayoutAnimationStatic`
+- `KeyboardStatic` (In this case there was no relevant `Keyboard` type alias)
+- `DevSettingsStatic` (In this case there was no relevant `DevSettings` type alias)
+- `I18nManagerStatic`
+- `EasingStatic`
+- `PanResponderStatic`
+- `NativeModulesStatic` (In this case there was no relevant `NativeModules` type alias)
+- `LogBoxStatic`
+- `PushNotificationIOSStatic`
+- `SettingsStatic`
+- `VibrationStatic`
+
+### Some core components are now function components instead of class components
+
+- `View`
+- `Image`
+- `TextInput`
+- `Modal`
+- `Text`
+- `TouchableWithoutFeedback`
+- `Switch`
+- `ActivityIndicator`
+- `ProgressBarAndroid`
+- `InputAccessoryView`
+- `Button`
+- `SafeAreaView`
+
+Due to this change, accessing ref types of these views requires using `React.ComponentRef` pattern which works as expected for both class and function components, e.g.:
+
+```ts title=""
+const ref = useRef>(null);
+```
+
+## Other breaking changes
+
+### Changes to Animated types
+
+Animated nodes were previously generic types based on their interpolation output. Now, they are non-generic types with a generic `interpolate` method.
+
+`Animated.LegacyRef` is no longer available.
+
+### Unified types for optional props
+
+In the new types, every optional prop will be typed as `type | undefined`.
+
+### Removal of some deprecated types
+
+All types listed in `DeprecatedPropertiesAlias.d.ts` are inaccessible under the Strict API.
+
+### Removal of leftover component props
+
+Some properties that were defined in type definitions but were not used by the component or were lacking a definition were removed (for example: `lineBreakMode` on `Text`, `scrollWithoutAnimationTo` on `ScrollView`, transform styles defined outside of transform array).
+
+### Previously accessible private type helpers may now be removed
+
+Due to the configuration of the previous type definitions, every defined type was accessible from the `react-native` package. This included types that were not explicitly exported and helper types that were only supposed to be used internally.
+
+Notable examples of this are types related to StyleSheet (like `RecursiveArray`, `RegisteredStyle` and `Falsy`) and Animated (like `WithAnimatedArray` and `WithAnimatedObject`).
diff --git a/website/versioned_docs/version-0.86/style.md b/website/versioned_docs/version-0.86/style.md
new file mode 100644
index 00000000000..d847c0597cb
--- /dev/null
+++ b/website/versioned_docs/version-0.86/style.md
@@ -0,0 +1,52 @@
+---
+id: style
+title: Style
+---
+
+With React Native, you style your application using JavaScript. All of the core components accept a prop named `style`. The style names and [values](colors.md) usually match how CSS works on the web, except names are written using camel casing, e.g. `backgroundColor` rather than `background-color`.
+
+The `style` prop can be a plain old JavaScript object. That's what we usually use for example code. You can also pass an array of styles - the last style in the array has precedence, so you can use this to inherit styles.
+
+As a component grows in complexity, it is often cleaner to use `StyleSheet.create` to define several styles in one place. Here's an example:
+
+```SnackPlayer name=Style
+import React from 'react';
+import {StyleSheet, Text, View} from 'react-native';
+
+const LotsOfStyles = () => {
+ return (
+
+ just red
+ just bigBlue
+ bigBlue, then red
+ red, then bigBlue
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ marginTop: 50,
+ },
+ bigBlue: {
+ color: 'blue',
+ fontWeight: 'bold',
+ fontSize: 30,
+ },
+ red: {
+ color: 'red',
+ },
+});
+
+export default LotsOfStyles;
+```
+
+One common pattern is to make your component accept a `style` prop which in turn is used to style subcomponents. You can use this to make styles "cascade" the way they do in CSS.
+
+There are a lot more ways to customize the text style. Check out the [Text component reference](text.md) for a complete list.
+
+Now you can make your text beautiful. The next step in becoming a style expert is to [learn how to control component size](height-and-width.md).
+
+## Known issues
+
+- [react-native#29308](https://github.com/facebook/react-native/issues/29308#issuecomment-792864162): In some cases React Native does not match how CSS works on the web, for example the touch area never extends past the parent view bounds and on Android negative margin is not supported.
diff --git a/website/versioned_docs/version-0.86/stylesheet.md b/website/versioned_docs/version-0.86/stylesheet.md
new file mode 100644
index 00000000000..62f32c8f805
--- /dev/null
+++ b/website/versioned_docs/version-0.86/stylesheet.md
@@ -0,0 +1,351 @@
+---
+id: stylesheet
+title: StyleSheet
+---
+
+A StyleSheet is an abstraction similar to CSS StyleSheets.
+
+```SnackPlayer name=StyleSheet
+import React from 'react';
+import {StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => (
+
+
+ React Native
+
+
+);
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ padding: 24,
+ backgroundColor: '#eaeaea',
+ },
+ title: {
+ marginTop: 16,
+ paddingVertical: 8,
+ borderWidth: 4,
+ borderColor: '#20232a',
+ borderRadius: 6,
+ backgroundColor: '#61dafb',
+ color: '#20232a',
+ textAlign: 'center',
+ fontSize: 30,
+ fontWeight: 'bold',
+ },
+});
+
+export default App;
+```
+
+Code quality tips:
+
+- By moving styles away from the render function, you're making the code easier to understand.
+- Naming the styles is a good way to add meaning to the low level components in the render function, and encourage reuse.
+- In most IDEs, using `StyleSheet.create()` will offer static type checking and suggestions to help you write valid styles.
+
+---
+
+# Reference
+
+## Methods
+
+### `compose()`
+
+```tsx
+static compose(style1: Object, style2: Object): Object | Object[];
+```
+
+Combines two styles such that `style2` will override any styles in `style1`. If either style is falsy, the other one is returned without allocating an array, saving allocations and maintaining reference equality for PureComponent checks.
+
+```SnackPlayer name=Compose
+import React from 'react';
+import {StyleSheet, Text} from 'react-native';
+import {SafeAreaView, SafeAreaProvider} from 'react-native-safe-area-context';
+
+const App = () => (
+
+
+ React Native
+
+
+);
+
+const page = StyleSheet.create({
+ container: {
+ flex: 1,
+ padding: 24,
+ backgroundColor: '#fff',
+ },
+ text: {
+ fontSize: 30,
+ color: '#000',
+ },
+});
+
+const lists = StyleSheet.create({
+ listContainer: {
+ flex: 1,
+ backgroundColor: '#61dafb',
+ },
+ listItem: {
+ fontWeight: 'bold',
+ },
+});
+
+const container = StyleSheet.compose(page.container, lists.listContainer);
+const text = StyleSheet.compose(page.text, lists.listItem);
+
+export default App;
+```
+
+---
+
+### `create()`
+
+```tsx
+static create(styles: Object extends Record): Object;
+```
+
+An identity function for creating styles. The main practical benefit of creating styles inside `StyleSheet.create()` is static type checking against native style properties.
+
+---
+
+### `flatten()`
+
+```tsx
+static flatten(style: Array