Skip to content

220906 sync 0.70 #642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 57 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
9c243e6
Add a few Microsoft apps to the showcase (#3203)
kelset Jul 11, 2022
908317a
Correct minor mistake in native-components-android.md (#3210)
KartonM Jul 15, 2022
cfe5f4a
Update fast-refresh.md (#3208)
nurse-the-code Jul 15, 2022
1bc1662
Fixed Artsy logo and infoLink of oculus in webiste/showcase (#3199)
pushkarydv Jul 16, 2022
6987112
Wrap "Android SDK Build-Tools" with backticks (#3206)
Ovi Jul 16, 2022
fd970bc
Update keyboardavoidingview.md (#3202)
rj-jones Jul 16, 2022
c429e49
Update debugging.md (#3209)
nurse-the-code Jul 16, 2022
e1e4177
Add the blogpost for Hermes as the Default engine (#3212)
fbmal7 Jul 18, 2022
4030f7c
Update iOS data in Hermes default blog post (#3216)
neildhar Jul 20, 2022
aeb1b12
Update the contributing section docs (#3221)
kelset Jul 22, 2022
da4bfe8
Bump terser from 5.12.1 to 5.14.2 (#3219)
dependabot[bot] Jul 22, 2022
9cfedc7
docs: add build tools to Table of Contents (#3228)
fyzhu Jul 28, 2022
9931ece
Update build-speed.md (#3223)
M1ck0 Jul 28, 2022
4bda57e
Remove Uber Eats from showcase (#3229)
rickhanlonii Jul 29, 2022
0aa09ac
docs: add two sections to the New Architecture (#3230)
fyzhu Jul 29, 2022
0eb8af7
Note on connecting to React Native simulator. (#3214)
meatnordrink Jul 29, 2022
62ec668
Fix a couple of problems on the release runbook (#3222)
cortinico Jul 29, 2022
09b38e6
Improving UX: replace videos and links with SnackPlayers, update exam…
Simek Jul 29, 2022
ac29dab
Fix extra whitespace on debugging.md (#3233)
cortinico Jul 29, 2022
d1ab100
Add more info to Prerequisites for Libraries guide (#3238)
okwasniewski Aug 2, 2022
f90d5e4
[Docs] iOS Simulator version & UDID (#3225)
furkanarabaci Aug 3, 2022
6cbb612
Add retrospective as a copilot responsibility (#3242)
fortmarek Aug 4, 2022
a430168
update release related docs page (#3240)
kelset Aug 4, 2022
f093bc4
Update image.md (#2850)
erheron Aug 4, 2022
3217d12
Fix lint
Aug 4, 2022
95021e4
chore: Specify return vs resolve (#3236)
evancharlton Aug 4, 2022
00c49d9
update Docusaurus and other dependencies (#3218)
Simek Aug 5, 2022
a6348ad
Add kotlin examples in new-architecture-app-modules-android.md (#3241)
tusharvars Aug 5, 2022
b72a879
change links in main home (#3244)
kelset Aug 5, 2022
d16528a
Refactoring The New Architecture Guide (#3037)
Aug 8, 2022
358ac70
fix: Fix typo in the sidebar (#3247)
Aug 8, 2022
9996be8
Delete ubereats.png (#3246)
jessej-samuel Aug 9, 2022
1c21a9d
Fixed pod install instructions (#3243)
scarlac Aug 9, 2022
2a5e942
Update android studio screenshot (#3253)
alea12 Aug 10, 2022
ae544b5
Adding Android 13 Permissions into PermissionsAndroid (#3254)
gedeagas Aug 10, 2022
3a10cce
TextInput: Add cursorColor Android prop (#3255)
gedeagas Aug 10, 2022
d3281be
Update Android Studio screenshot (Windows) (#3257)
alea12 Aug 11, 2022
27065d0
docs (releases): small refactoring and updating templates (#3256)
kelset Aug 11, 2022
a1134b3
Update documentation for keyboard events on Android (#3259)
NickGerleman Aug 13, 2022
c65ee68
Update to Docusaurus stable release, fix alert admonition styling (#3…
Simek Aug 15, 2022
fc0bda6
Change asks to ask (grammar) (#3262)
denis-tsoi-mox Aug 16, 2022
2fd4e0d
contributing: remove old references (#3263)
kelset Aug 16, 2022
1cb8694
adding accessibilityLabelledBy to documentation (#3249)
fabOnReact Aug 16, 2022
9502b82
Update references to Expo / Expo CLI (#3267)
brentvatne Aug 17, 2022
622c8af
feat(images): Adding iOS Image Cache Limits (#3258)
gedeagas Aug 18, 2022
092a898
feat: update instructions around automatic linking (#3269)
thymikee Aug 18, 2022
50ce399
Follow up from #3267 with minor fixes (#3270)
brentvatne Aug 18, 2022
e28ed12
nit: fix typo in new architecture docs (#3261)
intergalacticspacehighway Aug 19, 2022
47d6a70
fix(images): move app-transport-security reference (#3271)
gedeagas Aug 19, 2022
133f5fa
Showcase page refresh (#3235)
Simek Aug 25, 2022
54718fa
fix: moving the Using forwardRef and Using a getter to a lower hierar…
Aug 28, 2022
2594241
Upgrade toast Android example to camelCase (#3283)
lucalves Aug 29, 2022
2673033
Fix link in Introduction (#3290)
gaearon Aug 31, 2022
574b7be
fix: push steps in a lower hierarchy level (#3296)
Sep 5, 2022
5eadfb3
fix type in the new architecture pillars section (#3297)
Sep 5, 2022
9a45641
cut 0.70 docs (take 2) (#3295)
dmytrorykun Sep 5, 2022
cea5507
Blog post for 0.70 RN release (#3298)
cortinico Sep 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .alexrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ exports.allow = [

// host refers to host objects in native code
'host-hostess',

// allowing this term to prevent reporting "primitive", which is a programming term
'savage',
];

// Use a "maybe" level of profanity instead of the default "unlikely".
Expand Down
4 changes: 3 additions & 1 deletion docs/_getting-started-linux-android.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import RemoveGlobalCLI from './\_remove-global-cli.md';

## Installing dependencies

You will need Node, the React Native command line interface, a JDK, and Android Studio.
Expand Down Expand Up @@ -77,7 +79,7 @@ React Native has a built-in command line interface. Rather than install and mana

<h2>Creating a new application</h2>

> If you previously installed a global `react-native-cli` package, please remove it as it may cause unexpected issues.
<RemoveGlobalCLI />

React Native has a built-in command line interface, which you can use to generate a new project. You can access it without installing anything globally using `npx`, which ships with Node.js. Let's create a new React Native project called "AwesomeProject":

Expand Down
6 changes: 4 additions & 2 deletions docs/_getting-started-macos-android.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import RemoveGlobalCLI from './\_remove-global-cli.md';

## Installing dependencies

You will need Node, Watchman, the React Native command line interface, a JDK, and Android Studio.
Expand Down Expand Up @@ -52,7 +54,7 @@ Once setup has finalized and you're presented with the Welcome screen, proceed t

Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the `Android 12 (S)` 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".
To do that, open Android Studio, click on "More Actions" button and select "SDK Manager".

![Android Studio Welcome](/docs/assets/GettingStartedAndroidStudioWelcomeMacOS.png)

Expand Down Expand Up @@ -91,7 +93,7 @@ React Native has a built-in command line interface. Rather than install and mana

<h2>Creating a new application</h2>

> If you previously installed a global `react-native-cli` package, please remove it as it may cause unexpected issues.
<RemoveGlobalCLI />

React Native has a built-in command line interface, which you can use to generate a new project. You can access it without installing anything globally using `npx`, which ships with Node.js. Let's create a new React Native project called "AwesomeProject":

Expand Down
4 changes: 2 additions & 2 deletions docs/_getting-started-macos-ios.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import M1Cocoapods from './\_markdown-m1-cocoapods.mdx';
import M1Cocoapods from './\_markdown-m1-cocoapods.mdx'; import RemoveGlobalCLI from './\_remove-global-cli.md';

## Installing dependencies

Expand Down Expand Up @@ -57,7 +57,7 @@ React Native has a built-in command line interface. Rather than install and mana

## Creating a new application

> If you previously installed a global `react-native-cli` package, please remove it as it may cause unexpected issues.
<RemoveGlobalCLI />

You can use React Native's built-in command line interface to generate a new project. Let's create a new React Native project called "AwesomeProject":

Expand Down
8 changes: 5 additions & 3 deletions docs/_getting-started-windows-android.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import RemoveGlobalCLI from './\_remove-global-cli.md';

<h2>Installing dependencies</h2>

You will need Node, the React Native command line interface, a JDK, and Android Studio.
Expand Down Expand Up @@ -47,7 +49,7 @@ Once setup has finalized and you're presented with the Welcome screen, proceed t

Android Studio installs the latest Android SDK by default. Building a React Native app with native code, however, requires the `Android 12 (S)` 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".
To do that, open Android Studio, click on "More Actions" button and select "SDK Manager".

![Android Studio Welcome](/docs/assets/GettingStartedAndroidStudioWelcomeWindows.png)

Expand All @@ -58,7 +60,7 @@ Select the "SDK Platforms" tab from within the SDK Manager, then check the box n
- `Android SDK Platform 31`
- `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 `31.0.0` is selected.
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 `31.0.0` is selected.

Finally, click "Apply" to download and install the Android SDK and related build tools.

Expand Down Expand Up @@ -108,7 +110,7 @@ React Native has a built-in command line interface. Rather than install and mana

<h2>Creating a new application</h2>

> If you previously installed a global `react-native-cli` package, please remove it as it may cause unexpected issues.
<RemoveGlobalCLI />

React Native has a built-in command line interface, which you can use to generate a new project. You can access it without installing anything globally using `npx`, which ships with Node.js. Let's create a new React Native project called "AwesomeProject":

Expand Down
5 changes: 5 additions & 0 deletions docs/_remove-global-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
> 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
> ```
17 changes: 17 additions & 0 deletions docs/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ To use, set the `accessibilityLabel` property to a custom string on your View, T

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` <div class="label android">Android</div>

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:

```jsx
<View>
<Text nativeID="formLabel">Label for Input Field</Text>
<TextInput
accessibilityLabel="input"
accessibilityLabelledBy="formLabel"
/>
</View>
```

In the above example, the screenreader announces `Input, Edit Box for Label for Input Field` when focusing on the TextInput.

### `accessibilityHint`

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.
Expand Down
2 changes: 1 addition & 1 deletion docs/appregistry.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: AppRegistry
<div className="banner-native-code-required">
<h3>Project with Native Code Required</h3>
<p>
If you are using the managed <code>expo-cli</code> workflow there is only ever one entry component registered with <code>AppRegistry</code> and it is handled automatically, you do not need to use this API.
If you are using the managed Expo workflow there is only ever one entry component registered with <code>AppRegistry</code> and it is handled automatically (or through <a href="https://docs.expo.dev/versions/latest/sdk/register-root-component/">registerRootComponent</a>). You do not need to use this API.
</p>
</div>

Expand Down
3 changes: 1 addition & 2 deletions docs/build-speed.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To mitigate this performance hit, this page shares some suggestions on how to **

## Build only one ABI during development (Android-only)

When building your android app locally, you build all the 4 ABIs by default: `armeabi-v7a`, `arm64-v8a`, `x86` & `x86_64`.
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.
Expand Down Expand Up @@ -45,7 +44,7 @@ $ ./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:
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.
Expand Down
21 changes: 13 additions & 8 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import con

## Accessing the In-App Developer Menu

You can access the developer menu by shaking your device or by selecting "Shake Gesture" inside the Hardware menu in the iOS Simulator. You can also use the `⌘D` keyboard shortcut when your app is running in the iOS Simulator, or `⌘M` when running in an Android emulator on Mac OS and `Ctrl+M` on Windows and Linux. Alternatively for Android, you can run the command `adb shell input keyevent 82` to open the dev menu (82 being the Menu key code).
You can access the developer menu by shaking your device or by selecting "Shake Gesture" inside the Hardware menu in the iOS Simulator. You can also use the `⌘D` keyboard shortcut when your app is running in the iOS Simulator, or `⌘M` when running in an Android emulator on macOS and `Ctrl+M` on Windows and Linux. Alternatively for Android, you can run the command `adb shell input keyevent 82` to open the dev menu (82 being the Menu key code).

![](/docs/assets/DeveloperMenu.png)

Expand All @@ -19,7 +19,7 @@ Fast Refresh is a React Native feature that allows you to get near-instant feedb

## Enabling Keyboard Shortcuts

React Native supports a few keyboard shortcuts in the iOS Simulator. They are described below. To enable them, open the Hardware menu, select Keyboard, and make sure that "Connect Hardware Keyboard" is checked.
React Native supports a few keyboard shortcuts in the iOS Simulator. They are described below. To enable them on macOS, inside the Simulator app, open the I/O menu, select Keyboard, and make sure that "Connect Hardware Keyboard" is checked.

## LogBox

Expand Down Expand Up @@ -75,8 +75,9 @@ The debugger will receive a list of all project roots, separated by a space. For

You can use Safari to debug the iOS version of your app without having to enable "Debug JS Remotely".

- Enable Develop menu in Safari: `Preferences → Advanced → Select "Show Develop menu in menu bar"`
- Select your app's JSContext: `Develop → Simulator → JSContext`
- On a physical device go to: `Settings → Safari → Advanced → Make sure "Web Inspector" is turned on` (This step is not needed on the Simulator)
- On your Mac enable Develop menu in Safari: `Preferences → Advanced → Select "Show Develop menu in menu bar"`
- Select your app's JSContext: `Develop → Simulator (or other device) → JSContext`
- Safari's Web Inspector should open which has a Console and a Debugger

While sourcemaps may not be enabled by default, you can follow [this guide](http://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.
Expand Down Expand Up @@ -116,7 +117,13 @@ react-devtools

It should connect to your simulator within a few seconds.

> Note: if you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools.
:::info
If connecting to the emulator proves troublesome (especially Android 12), try running `adb reverse tcp:8097 tcp:8097` in a new terminal.
:::

:::info
If you prefer to avoid global installations, you can add `react-devtools` as a project dependency. Add the `react-devtools` package to your project using `npm install --save-dev react-devtools`, then add `"react-devtools": "react-devtools"` to the `scripts` section in your `package.json`, and then run `npm run react-devtools` from your project folder to open the DevTools.
:::

### Integration with React Native Inspector

Expand Down Expand Up @@ -159,7 +166,7 @@ You can view installation instructions [in the README](https://github.com/infini
<div className="banner-native-code-required">
<h3>Projects with Native Code Only</h3>
<p>
The following section only applies to projects with native code exposed. If you are using the managed <code>expo-cli</code> workflow, see the guide on <a href="https://docs.expo.dev/workflow/customizing/" target="_blank">ejecting</a> to use this API.
The following section only applies to projects with native code exposed. If you are using the managed Expo workflow, see the guide on <a href="https://docs.expo.dev/workflow/prebuild/" target="_blank">prebuild</a> to use this API.
</p>
</div>

Expand All @@ -186,8 +193,6 @@ On Android 5.0+ devices connected via USB, you can use the [`adb` command line t

`adb reverse tcp:8081 tcp:8081`

<!-- alex ignore host-hostess -->

Alternatively, select "Dev Settings" from the Developer Menu, then update the "Debug server host for device" setting to match the IP address of your computer.

> If you run into any issues, it may be possible that one of your Chrome extensions is interacting in unexpected ways with the debugger. Try disabling all of your extensions and re-enabling them one-by-one until you find the problematic extension.
Expand Down
4 changes: 4 additions & 0 deletions docs/direct-manipulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ id: direct-manipulation
title: Direct Manipulation
---

import NativeDeprecated from './the-new-architecture/\_markdown_native_deprecation.mdx'

<NativeDeprecated />

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
Expand Down
2 changes: 1 addition & 1 deletion docs/fast-refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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 developer menu. With Fast Refresh enabled, most edits should be visible within a second or two.
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 developer 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

Expand Down
Loading