From 3371bb87a3b92d38964fcd975b1fff87049028a9 Mon Sep 17 00:00:00 2001 From: yatessss <897969073@qq.com> Date: Wed, 12 Apr 2023 11:17:51 +0800 Subject: [PATCH] Added steps for install npm dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix reporting the following error when npm not installing @react-native-masked-view/masked-view: TypeError: Cannot read property 'getViewManagerConfig' of undefined, js engine: hermes TypeError: Cannot read property 'SafeAreaProviderCompat' of undefined --- versioned_docs/version-6.x/drawer-navigator.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/versioned_docs/version-6.x/drawer-navigator.md b/versioned_docs/version-6.x/drawer-navigator.md index b40cdb5ebe7..4208266f991 100644 --- a/versioned_docs/version-6.x/drawer-navigator.md +++ b/versioned_docs/version-6.x/drawer-navigator.md @@ -48,7 +48,20 @@ Then, you need to install and configure the libraries that are required by the d > 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. -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. +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)). + + If you have a Expo managed project, in your project directory, run: + + ```bash + npx expo install @react-native-masked-view/masked-view + ``` + + If you have a bare React Native project, in your project directory, run: + + ```bash npm2yarn + npm install @react-native-masked-view/masked-view + +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. ```bash npx pod-install ios