react-native-snap-carousel
react-native-snap-carousel copied to clipboard
Fix: ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
replace the code to solve my problem in React Native 0.69.6 to import the 'deprecated-react-native-prop-types'
Here is the diff that solved my problem:
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..8056cd4 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,6 @@
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..4741489 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,6 @@
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..84821b5 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,6 @@
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..8fc99b7 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,8 @@
// 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';
This issue body was partially generated by patch-package.
is anyone actively working on this repo ? this issue is becoming a real problem with newest versions of react native
up
Perhaps we'd be better off with someone just forking the project if there's no one around to build a new version anymore?
Have a fork here and when installing from this it works fine for me
Have a fork here and when installing from this it works fine for me
Hi @paulsjohnson91 , will you maintain and/or add features ? I also noticed there's this https://github.com/dohooo/react-native-reanimated-carousel#readme that looks promising. 👋
https://github.com/meliorence/react-native-snap-carousel/pull/955 I sent PR for this error.
https://github.com/meliorence/react-native-snap-carousel/pull/955 I sent PR for this error.
This package is abandoned
Well, they can use this: https://github.com/lfabl/react-native-snap-carousel
yarn add https://github.com/lfabl/react-native-snap-carousel
or
npm i --save https://github.com/lfabl/react-native-snap-carousel
There is working beta for newest version of react native: https://www.npmjs.com/package/react-native-snap-carousel/v/4.0.0-beta.6
npm i [email protected]
There is working beta for newest version of react native: https://www.npmjs.com/package/react-native-snap-carousel/v/4.0.0-beta.6
npm i [email protected]
@michal-pusz but why no answer from the maintainer ? it's a bit risky to use this in a production software
react-native-reanimated-carousel seems to be the way to go as it's actively maintained
react-native-reanimated-carousel seems to be the way to go as it's actively maintained
looks good
There is working beta for newest version of react native: https://www.npmjs.com/package/react-native-snap-carousel/v/4.0.0-beta.6 npm i [email protected]
@michal-pusz but why no answer from the maintainer ? it's a bit risky to use this in a production software
i was thinking the same! why not comment if something exists
i did try it and works fine for me
Can anyone confirm that version [email protected] works on RN 0.69+ ?
@danidaryaweesh I tried it and seems to be working fine, but please be careful if you want to use it in production environment since it seems to be a beta version only.
Thanks for the feedback @Guille47! I was already using this library in production with no issues. But I'm upgrading my RN from version 0.64.2 to 0.69.6, so I'm checking all libraries before doing that
Guys i already create a fork, because i think something happened with the maintainer of this repo ... try using my solution on
https://www.npmjs.com/package/react-native-new-snap-carousel
hope this help
Guys i already create a fork, because i think something happened with the maintainer of this repo ... try using my solution on
https://www.npmjs.com/package/react-native-new-snap-carousel
hope this help
i tried your one but 404 not found error is coming please share solution for that