meliorence / meliorence/react-native-snap-carousel
ViewPropTypes will crash in React Native 0.74+, because ViewPropTypes was completely removed.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-snap-carousel@3.9.1 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/.DS_Store b/node_modules/react-native-snap-carousel/src/.DS_Store
new file mode 100644
index 0000000..60e5e73
Binary files /dev/null and b/node_modules/react-native-snap-carousel/src/.DS_Store differ
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..3cd90ac 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,5 @@
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 PropTypes from 'prop-types';
import shallowCompare from 'react-addons-shallow-compare';
import {
@@ -11,6 +11,8 @@ import {
stackAnimatedStyles,
tinderAnimatedStyles
} from '../utils/animations';
+import { ViewPropTypes } from 'deprecated-react-native-prop-types';
+
const IS_IOS = Platform.OS === 'ios';
This issue body was partially generated by patch-package.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the imports in src/carousel/Carousel.js and compare them with the React Native 0.74 compatibility problem described in the issue. Verify the relevant prop-type dependency and check the carousel entry points that use ViewPropTypes; done means the package no longer crashes on React Native 0.74+.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100