Skip to content

ViewPropTypes will crash in React Native 0.74+, because ViewPropTypes was completely removed. #1055

Description

@rahul-sysquare

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.

Activity

  1. bogdanovic91 commented on Oct 9, 2025

    @bogdanovic91

    God bless you man! :D i just made a RN. upgrade thanks to you :D @rahul-sysquare

  2. rahul-sysquare commented on Oct 9, 2025

    @rahul-sysquare
    Author

    God bless you man! :D i just made a RN. upgrade thanks to you :D @rahul-sysquare

    Thanks to the package creator 💯 . It automatically asked me to create this issue on github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions