Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types #954

Open
mssoliveira opened this issue Sep 29, 2022 · 18 comments

Comments

@mssoliveira
Copy link

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.

@mssoliveira mssoliveira changed the title Fix Fix: ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types Sep 29, 2022
@minotogna
Copy link

is anyone actively working on this repo ? this issue is becoming a real problem with newest versions of react native

@alefemafra
Copy link

up

@paulsjohnson91
Copy link

Perhaps we'd be better off with someone just forking the project if there's no one around to build a new version anymore?

@paulsjohnson91
Copy link

Have a fork here and when installing from this it works fine for me

@minotogna
Copy link

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.
👋

@lfabl
Copy link

lfabl commented Oct 3, 2022

#955 I sent PR for this error.

@minotogna
Copy link

#955 I sent PR for this error.

This package is abandoned

@lfabl
Copy link

lfabl commented Oct 4, 2022

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

@michal-pusz
Copy link

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]

@minotogna
Copy link

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

@paulsjohnson91
Copy link

react-native-reanimated-carousel seems to be the way to go as it's actively maintained

@farhanhaider1
Copy link

react-native-reanimated-carousel seems to be the way to go as it's actively maintained

looks good

@farhanhaider1
Copy link

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

@danidaryaweesh
Copy link

Can anyone confirm that version [email protected] works on RN 0.69+ ?

@Guille47
Copy link

@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.

@danidaryaweesh
Copy link

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

@ciberbob-007
Copy link

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

@deepaktractorj
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests