Open GrimonprezAlexis opened 1 year ago
Same here =/
I am getting this error as well.
Me too
me too
use patch-package react-native-snap-carousel+3.9.1.patch:
diff --git a/node_modules/react-native-snap-carousel/src/carousel/Carousel.js b/node_modules/react-native-snap-carousel/src/carousel/Carousel.js
index dae71a3..126a83e 100644
--- a/node_modules/react-native-snap-carousel/src/carousel/Carousel.js
+++ b/node_modules/react-native-snap-carousel/src/carousel/Carousel.js
@@ -1,5 +1,7 @@
import React, { Component } from 'react';
-import { Animated, Easing, FlatList, I18nManager, Platform, ScrollView, View, ViewPropTypes } from 'react-native';
+import { Animated, Easing, FlatList, I18nManager, Platform, ScrollView, View } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
+
import PropTypes from 'prop-types';
import shallowCompare from 'react-addons-shallow-compare';
import {
diff --git a/node_modules/react-native-snap-carousel/src/pagination/Pagination.js b/node_modules/react-native-snap-carousel/src/pagination/Pagination.js
index 5c021cf..061f225 100644
--- a/node_modules/react-native-snap-carousel/src/pagination/Pagination.js
+++ b/node_modules/react-native-snap-carousel/src/pagination/Pagination.js
@@ -1,5 +1,7 @@
import React, { PureComponent } from 'react';
-import { I18nManager, Platform, View, ViewPropTypes } from 'react-native';
+import { I18nManager, Platform, View } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
+
import PropTypes from 'prop-types';
import PaginationDot from './PaginationDot';
import styles from './Pagination.style';
diff --git a/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js b/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js
index e59d196..2492c6f 100644
--- a/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js
+++ b/node_modules/react-native-snap-carousel/src/pagination/PaginationDot.js
@@ -1,5 +1,7 @@
import React, { PureComponent } from 'react';
-import { View, Animated, Easing, TouchableOpacity, ViewPropTypes } from 'react-native';
+import { View, Animated, Easing, TouchableOpacity } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
+
import PropTypes from 'prop-types';
import styles from './Pagination.style';
diff --git a/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js b/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js
index 8bc774a..2466afb 100644
--- a/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js
+++ b/node_modules/react-native-snap-carousel/src/parallaximage/ParallaxImage.js
@@ -1,7 +1,9 @@
// Parallax effect inspired by https://github.com/oblador/react-native-parallax/
import React, { Component } from 'react';
-import { View, ViewPropTypes, Image, Animated, Easing, ActivityIndicator, findNodeHandle } from 'react-native';
+import { View, Image, Animated, Easing, ActivityIndicator, findNodeHandle } from 'react-native';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
+
import PropTypes from 'prop-types';
import styles from './ParallaxImage.style';
Same here. react-native 0.71.4
I really expect react-native-snap-carousel to upgrade ASAP so it will not break on a newer version of react-native.
Same here. react-native 0.71.4
I really expect react-native-snap-carousel to upgrade ASAP so it will not break on a newer version of react-native.
This lib is abandoned and will receive no future updates.
Same here. react-native 0.71.4 I really expect react-native-snap-carousel to upgrade ASAP so it will not break on a newer version of react-native.
This lib is abandoned and will receive no future updates.
Has it been replaced by a new library?
Has it been replaced by a new library?
You might want to migrate to reanimated carousel, though it's not 1:1 with this lib, being more modular which makes it not as simple to set up; But it's actively maintained and less prone to bugs.
Edit: lib link
thank you
Worked, thanks
Is there is any solution instead of migrating to TypeScript or using other library instead of react-native-snap-carousel
install this version yarn add react-native-snap-carousel@4.0.0-beta.6
thank @Karroch-a . Is working.
install this version
yarn add react-native-snap-carousel@4.0.0-beta.6
Worked for me, thanks.
Thank you @Karroch-a , beta is working.
Working on Expo 51, thanks @Karroch-a
[Expo App] - React native IOS
ERROR ViewPropTypes will be removed from React Native, along with all other PropTypes. We recommend that you migrate away from PropTypes and switch to a type system like TypeScript.
If you need to continue using ViewPropTypes, migrate to the
deprecated-react-native-prop-types
package. This package provides the oldPropTypes
that have been removed from React Native.npm install deprecated-react-native-prop-types
Import the
ViewPropTypes
fromdeprecated-react-native-prop-types
instead ofreact-native
Replace all instances of ViewPropTypes in theses files