You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/drawer-layout.md
+1-26Lines changed: 1 addition & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -38,32 +38,7 @@ Then, you need to install and configure the libraries that are required by the d
38
38
39
39
2. Configure the Reanimated Babel Plugin in your project following the [installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started).
40
40
41
-
3. To finalize the installation of `react-native-gesture-handler`, we need to conditionally import it. To do this, create 2 files:
42
-
43
-
```js title="gesture-handler.native.js"
44
-
// Only import react-native-gesture-handler on native platforms
45
-
import'react-native-gesture-handler';
46
-
```
47
-
48
-
```js title="gesture-handler.js"
49
-
// Don't import react-native-gesture-handler on web
50
-
```
51
-
52
-
Now, 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`:
53
-
54
-
```js
55
-
import'./gesture-handler';
56
-
```
57
-
58
-
Since the drawer layout doesn't use `react-native-gesture-handler` on Web, this avoids unnecessarily increasing the bundle size.
59
-
60
-
:::warning
61
-
62
-
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.
63
-
64
-
:::
65
-
66
-
4. If you're on a Mac and developing for iOS, you also need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
41
+
3. If you're on a Mac and developing for iOS, you also need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/drawer-navigator.md
+1-26Lines changed: 1 addition & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -38,32 +38,7 @@ Then, you need to install and configure the libraries that are required by the d
38
38
39
39
2. Configure the Reanimated Babel Plugin in your project following the [installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started).
40
40
41
-
3. To finalize the installation of `react-native-gesture-handler`, we need to conditionally import it. To do this, create 2 files:
42
-
43
-
```js title="gesture-handler.native.js"
44
-
// Only import react-native-gesture-handler on native platforms
45
-
import'react-native-gesture-handler';
46
-
```
47
-
48
-
```js title="gesture-handler.js"
49
-
// Don't import react-native-gesture-handler on web
50
-
```
51
-
52
-
Now, 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`:
53
-
54
-
```js
55
-
import'./gesture-handler';
56
-
```
57
-
58
-
Since the drawer navigator doesn't use `react-native-gesture-handler` on Web, this avoids unnecessarily increasing the bundle size.
59
-
60
-
:::warning
61
-
62
-
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.
63
-
64
-
:::
65
-
66
-
4. If you're on a Mac and developing for iOS, you also need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
41
+
3. If you're on a Mac and developing for iOS, you also need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/stack-navigator.md
+2-27Lines changed: 2 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -42,32 +42,7 @@ Then, you need to install and configure the libraries that are required by the s
42
42
npm install react-native-gesture-handler
43
43
```
44
44
45
-
2. To finalize the installation of `react-native-gesture-handler`, we need to conditionally import it. To do this, create 2 files:
46
-
47
-
```js title="gesture-handler.native.js"
48
-
// Only import react-native-gesture-handler on native platforms
49
-
import'react-native-gesture-handler';
50
-
```
51
-
52
-
```js title="gesture-handler.js"
53
-
// Don't import react-native-gesture-handler on web
54
-
```
55
-
56
-
Now, 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`:
57
-
58
-
```js
59
-
import'./gesture-handler';
60
-
```
61
-
62
-
Since the stack navigator doesn't use `react-native-gesture-handler` on Web, this avoids unnecessarily increasing the bundle size.
63
-
64
-
:::warning
65
-
66
-
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.
67
-
68
-
:::
69
-
70
-
3. Optionally, you can also install [`@react-native-masked-view/masked-view`](https://github.com/react-native-masked-view/masked-view). This is needed if you want to use UIKit style animations for the header ([`HeaderStyleInterpolators.forUIKit`](#headerstyleinterpolators)).
45
+
2. Optionally, you can also install [`@react-native-masked-view/masked-view`](https://github.com/react-native-masked-view/masked-view). This is needed if you want to use UIKit style animations for the header ([`HeaderStyleInterpolators.forUIKit`](#headerstyleinterpolators)).
71
46
72
47
If you have a Expo managed project, in your project directory, run:
73
48
@@ -81,7 +56,7 @@ Then, you need to install and configure the libraries that are required by the s
81
56
npm install @react-native-masked-view/masked-view
82
57
```
83
58
84
-
4. If you're on a Mac and developing for iOS, you also need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
59
+
3. If you're on a Mac and developing for iOS, you also need to install the pods (via [Cocoapods](https://cocoapods.org/)) to complete the linking.
0 commit comments