Skip to content

Commit 7316c2e

Browse files
authored
Merge pull request #159 from reactwg/nits-to-docs
Minor updates to New Architecture docs
2 parents 9b4c6f6 + 6964346 commit 7316c2e

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

docs/appendix.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ Callback functions are not type checked, and are generalized as `Object`s.
171171
172172
## IV. Invoking the code-gen during development
173173

174-
> This section contains information specific to v0.66 of React Native.
175-
176174
The Codegen is typically invoked at build time, but you may find it useful to generate your native interface code on demand for troubleshooting.
177175

178176
If you wish to invoke the Codegen manually, you have three options:
@@ -264,10 +262,6 @@ In the above example, the code-gen script will generate several files: `MyLibSpe
264262

265263
This guide provides instructions for migrating an application that is based on the default app template that is provided by React Native. If your app has deviated from the template, or you are working with an application that was never based off the template, then the following sections might help.
266264

267-
### Finding your bridge delegate
268-
269-
This guide assumes that the `AppDelegate` is configured as the bridge delegate. If you are not sure which is your bridge delegate, then place a breakpoint in `RCTBridge` and `RCTCxxBridge`, run your app, and inspect `self.delegate`.
270-
271265
---
272266

273267
> [!IMPORTANT]

docs/enable-apps.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ This page will help you create or migrate a React Native app that uses the New A
88
> If you're using Expo or plan to use Expo, you can't enable the New Architecture at the moment and will have to wait for a future release of the Expo SDK.
99
1010
### Prerequisites
11+
1112
1. Use or upgrade to the latest React Native version. This guide is written with the expectation that you’re using the [**latest** React Native release](https://github.com/facebook/react-native/releases/latest).
1213
2. If you previously installed a global `react-native-cli` package, please remove it as it may cause unexpected issues:
14+
1315
```shell
1416
npm uninstall -g react-native-cli @react-native-community/cli
1517
```
18+
1619
3. Enable Hermes. If you are using React Native 0.70 or above, it is already the [default JS engine](https://reactnative.dev/blog/2022/07/08/hermes-as-the-default) so no action is needed.
1720

1821
### Create a React Native app
@@ -24,12 +27,15 @@ If following the setup guide, stop when you reach the section **Running your Rea
2427
Then, create a new React Native project from the template:
2528

2629
```shell
27-
npx react-native@latest init AwesomeProject
30+
npx react-native@latest init AwesomeProject --skip-install
31+
cd AwesomeProject
32+
yarn install
2833
```
2934

3035
### Enable New Architecture for iOS
3136

3237
#### For new apps created from React Native CLI
38+
3339
Navigate to the `ios` directory and run the following:
3440

3541
```shell
@@ -38,12 +44,15 @@ bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
3844
```
3945

4046
Then build and run the app as usual:
47+
4148
```shell
4249
yarn ios
4350
```
4451

45-
#### For existing apps
52+
#### For existing apps
53+
4654
You'll need to reinstall your pods by running `pod install` with the right flag:
55+
4756
```shell
4857
# Run pod install with the flag:
4958
RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
@@ -60,6 +69,7 @@ You will need to run `pod install` each time a dependency with native code chang
6069
"pod-install": "RCT_NEW_ARCH_ENABLED=1 bundle exec pod install"
6170
}
6271
```
72+
6373
and run it with `yarn pod-install`. Note that `bundle install` does not need to run a second time, as long as the Gemfile has not changed.
6474

6575
##### Use Xcode to rename files in the `ios` folder
@@ -81,6 +91,7 @@ If you see a build failure from `react-native run-ios`, there may be cached file
8191
> You may notice longer build times with the New Architecture due to additional step of C++ compilation with the Android NDK. To improve your build time, see [Speeding Up Your Build Phase](https://reactnative.dev/docs/build-speed).
8292
8393
#### For new apps created from React Native CLI
94+
8495
Set the `newArchEnabled` property to `true` by **either**:
8596

8697
- Changing the corresponding line in `android/gradle.properties`
@@ -93,6 +104,7 @@ yarn android
93104
```
94105

95106
#### For existing apps
107+
96108
You will only need to update your `android/gradle.properties` file as follows:
97109

98110
```diff

docs/troubleshooting.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ The CocoaPods integration will see frequent updates as we rollout the New Archit
2323
3. Delete `node_modules` and re-run `yarn install`.
2424
4. Delete your codegen artifacts and re-run `pod install` (or `arch -x86_64 pod install`, in case of a Mac M1), then clean and build your Xcode project.
2525

26-
## Folly Version
27-
28-
As it happens, the Folly version used in your podspec must match whatever version is used in React Native at this time. If you see the following error after running `pod install`:
29-
30-
```
31-
[!] CocoaPods could not find compatible versions for pod "RCT-Folly":
32-
```
33-
34-
...you may have a version-mismatch. Take a look at your `node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec.podspec` file and make note of the `folly_version` used there. Go back to your own podspec and set your `folly_version` to match.
35-
3626
## Android build is failing with `OutOfMemoryException`
3727

3828
If your Android Gradle builds are failing with: `OutOfMemoryException: Out of memory: Java heap space.` or similar errors related to low memory, you might need to increase the memory allocated to the JVM.

0 commit comments

Comments
 (0)