Skip to content

Commit 2832f1a

Browse files
committed
Remove gesture-handler and reanimated from getting started
1 parent b8f6ed9 commit 2832f1a

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

versioned_docs/version-6.x/drawer-navigator.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ Component that renders a navigation drawer which can be opened and closed via ge
1515
To use this navigator, ensure that you have [`@react-navigation/native` and its dependencies (follow this guide)](getting-started.md), then install [`@react-navigation/drawer`](https://github.com/react-navigation/react-navigation/tree/main/packages/drawer):
1616

1717
```bash npm2yarn
18-
npm install @react-navigation/drawer
18+
npm install @react-navigation/drawer react-native-gesture-handler react-native-reanimated
1919
```
2020

21+
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`:
22+
23+
```js
24+
import 'react-native-gesture-handler';
25+
```
26+
27+
> Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms.
28+
2129
## API Definition
2230

2331
To use this drawer navigator, import it from `@react-navigation/drawer`:

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ npm install @react-navigation/native
3131

3232
React Navigation is made up of some core utilities and those are then used by navigators to create the navigation structure in your app. Don't worry too much about this for now, it'll become clear soon enough! To frontload the installation work, let's also install and configure dependencies used by most navigators, then we can move forward with starting to write some code.
3333

34-
The libraries we will install now are [`react-native-gesture-handler`](https://github.com/software-mansion/react-native-gesture-handler), [`react-native-reanimated`](https://github.com/software-mansion/react-native-reanimated), [`react-native-screens`](https://github.com/software-mansion/react-native-screens) and [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context). If you already have these libraries installed and at the latest version, you are done here! Otherwise, read on.
34+
The libraries we will install now are [`react-native-screens`](https://github.com/software-mansion/react-native-screens) and [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context). If you already have these libraries installed and at the latest version, you are done here! Otherwise, read on.
3535

3636
### Installing dependencies into an Expo managed project
3737

3838
In your project directory, run:
3939

4040
```sh
41-
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context
41+
expo install react-native-screens react-native-safe-area-context
4242
```
4343

4444
This will install versions of these libraries that are compatible.
@@ -50,13 +50,11 @@ You can now continue to ["Hello React Navigation"](hello-react-navigation.md) to
5050
In your project directory, run:
5151

5252
```bash npm2yarn
53-
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context
53+
npm install react-native-screens react-native-safe-area-context
5454
```
5555

5656
> Note: You might get warnings related to peer dependencies after installation. They are usually caused by incorrect version ranges specified in some packages. You can safely ignore most warnings as long as your app builds.
5757
58-
> Note: If using this project with [react-native-windows](https://github.com/microsoft/react-native-windows), omit `react-native-gesture-handler`.
59-
6058
From React Native 0.60 and higher, [linking is automatic](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md). So you **don't need to run** `react-native link`.
6159

6260
If you're on a Mac and developing for iOS, you need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
@@ -85,18 +83,9 @@ import android.os.Bundle;
8583

8684
This change is required to avoid crashes related to View state being not persisted consistently across Activity restarts.
8785

88-
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`:
89-
90-
```js
91-
import 'react-native-gesture-handler';
92-
```
93-
94-
> Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms.
95-
9686
Now, we need to wrap the whole app in `NavigationContainer`. Usually you'd do this in your entry file, such as `index.js` or `App.js`:
9787

9888
```js
99-
import 'react-native-gesture-handler';
10089
import * as React from 'react';
10190
import { NavigationContainer } from '@react-navigation/native';
10291

versioned_docs/version-6.x/stack-navigator.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ By default the stack navigator is configured to have the familiar iOS and Androi
1717
To use this navigator, ensure that you have [`@react-navigation/native` and its dependencies (follow this guide)](getting-started.md), then install [`@react-navigation/stack`](https://github.com/react-navigation/react-navigation/tree/main/packages/stack):
1818

1919
```bash npm2yarn
20-
npm install @react-navigation/stack
20+
npm install @react-navigation/stack react-native-gesture-handler
2121
```
2222

23+
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`:
24+
25+
```js
26+
import 'react-native-gesture-handler';
27+
```
28+
29+
> Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms.
30+
2331
## API Definition
2432

2533
To use this navigator, import it from `@react-navigation/stack`:

0 commit comments

Comments
 (0)