Skip to content

Commit 83bedbd

Browse files
docs: move screens config to getting-started
1 parent 8c4f7bf commit 83bedbd

File tree

3 files changed

+20
-45
lines changed

3 files changed

+20
-45
lines changed

versioned_docs/version-6.x/getting-started.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,26 @@ If you're on a Mac and developing for iOS, you need to install the pods (via [Co
6565
npx pod-install ios
6666
```
6767

68+
`react-native-screens` package requires one additional configuration step to properly
69+
work on Android devices. Edit `MainActivity.java` file which is located in `android/app/src/main/java/<your package name>/MainActivity.java`.
70+
71+
Add the following code to the body of `MainActivity` class:
72+
73+
```java
74+
@Override
75+
protected void onCreate(Bundle savedInstanceState) {
76+
super.onCreate(null);
77+
}
78+
```
79+
80+
and make sure to add an import statement at the top of this file:
81+
82+
```java
83+
import android.os.Bundle;
84+
```
85+
86+
This change is required to avoid crashes related to View state being not persisted consistently across Activity restarts.
87+
6888
To finalize installation of `react-native-gesture-handler`, add the following at the **top** (make sure it's at the top and there's nothing else before it) of your entry file, such as `index.js` or `App.js`:
6989

7090
```js

versioned_docs/version-6.x/react-native-screens.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

versioned_sidebars/version-6.x-sidebars.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"version-6.x/typescript",
4040
"version-6.x/redux-integration",
4141
"version-6.x/MST-integration",
42-
"version-6.x/react-native-screens",
4342
"version-6.x/upgrading-from-5.x"
4443
],
4544
"API Reference": [

0 commit comments

Comments
 (0)