Andr3wHur5t / react-native-keyboard-spacer

Plug and play react-native keyboard spacer view.
MIT License
1.56k stars 219 forks source link

Invariant Violation with react-native 0.70 #83

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-keyboard-spacer@0.4.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-keyboard-spacer/KeyboardSpacer.js b/node_modules/react-native-keyboard-spacer/KeyboardSpacer.js
index 14560d8..806f044 100644
--- a/node_modules/react-native-keyboard-spacer/KeyboardSpacer.js
+++ b/node_modules/react-native-keyboard-spacer/KeyboardSpacer.js
@@ -8,11 +8,12 @@ import {
   LayoutAnimation,
   View,
   Dimensions,
-  ViewPropTypes,
   Platform,
   StyleSheet
 } from 'react-native';

+import {ViewPropTypes} from 'deprecated-react-native-prop-types';
+
 const styles = StyleSheet.create({
   container: {
     left: 0,

This issue body was partially generated by patch-package.

c-goettert commented 1 year ago

We are also facing this issue. A fix would be really great :)