chilijung / react-native-carousel-view

react-native carousel, support in both Android and iOS
73 stars 44 forks source link

deprecation warning for ViewPagerAndroid #21

Open miticous opened 5 years ago

miticous commented 5 years ago

rn -v @0.59.0 Problem: viewpagerandroid has been extracted from react-native core and will be removed in a future release

Scnshot: Screenshot_1552595655

Possible fix:

Change ViewPagerAndroid component to ScrollView

paour commented 4 years ago

This project doesn't look active anymore.

You can add @react-native-community/viewpager to your project and user patch-package with the the patch file in this gist (place in patches in your project root).

JamesDullaghan commented 4 years ago

@paour Have you tried this with patch-package? We've deployed ios to test flight and with production builds are still encountering crashes on swipe even with patch-package.

Do you have any insight on this?

ArbazYousuf commented 4 years ago

open node_module/react-native-carousel-view/carouselPager.android.js and change the import from:

import {
  ViewPagerAndroid,
} from 'react-native';

to:

import ViewPager from '@react-native-community/viewpager';

also change this line on same file from: viewPager: ViewPagerAndroid to: viewPager: ViewPager

and also change the name in class same file...

it work on my code.. like it if is right approach