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

viewproptypes will be removed from react native issue, fixed. #985

Open
ProCakeMan opened this issue Jun 7, 2023 · 4 comments
Open

viewproptypes will be removed from react native issue, fixed. #985

ProCakeMan opened this issue Jun 7, 2023 · 4 comments

Comments

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

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..72971cb 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..c02e0d6 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..41bd4f9 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..da72b06 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.

@typio
Copy link

typio commented Jun 22, 2023

That was a really annoying error, thanks for sharing!

@fengxiao361
Copy link

thanks for sharing!

@rnrydnd
Copy link

rnrydnd commented Jun 29, 2023

thx!

@JustLolo
Copy link

when is this going to be merged????

KiranCNayak added a commit to KiranCNayak/rn_app_03_wallpaper_app that referenced this issue Sep 11, 2023
• Added `patch-package` and `postinstall-postinstall` packages, for react-native-snap-carousel library issue.
• Added `react-native-linear-gradient` package.
• Added `react-native-config` package to store env variables.
• Made changes to `android/app/build.gradle` to apply 2 changes.
• First, icons specific change for `react-native-vector-icons`.
• Second, `react-native-config` related changes.

• Changed the patch file, as it was not getting applied properly. Took help from meliorence/react-native-snap-carousel#985 (comment)

• Created `Constants` file.
• Added `FullCategory` and `ImageDisplay` pages. For now they don't have anything special.
• Separated the styles component from Home Page, as it was becoming huge chunk to be kept in `HomeView.js` file.
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

5 participants